Spill oversized agent review payloads to a file and send the path - #1238
Merged
Conversation
h0x91b
enabled auto-merge (squash)
August 3, 2026 10:16
h0x91b
added a commit
that referenced
this pull request
Aug 3, 2026
#1139) * Add ask-dev3 skill: feature router auto-installed for all agents * ask-dev3: add 'read the source' pointers (repo, decisions, changelogs) * ask-dev3: rewrite content around 21 curated user stories, add AGENTS.md nudge + decision record * ask-dev3: elevate dev server to the top verification habit, add 30-second-check story * ask-dev3: add per-task port allocation story (DEV3_PORT* env vars) * ask-dev3: expand visual proof into screenshots, artifacts, and ZIP-to-PDF stories * ask-dev3: add tmux-awareness story (talk to the agent in panes and windows) * ask-dev3: add focus mode story (fullscreen task + muted notifications) * ask-dev3: add terminal paste/drag-and-drop upload story * ask-dev3: fix Operations board and diff snapshots factual errors * ask-dev3: add 14 curated stories from the tips registry * ask-dev3: move changelog entry to PR open date * ask-dev3: renumber decision record to 182 and retarget changelog date Rebasing on main revealed two existing 141-* records; the decision sequence has since reached 181. * ask-dev3: add cross-task agent messaging and agent-accounts stories Groups the multi-agent stories under a new 'More than one agent' section (spawn an extra agent moves there from the tmux list) and covers dev3 message --task seq:N with its <dev3-ai-message> envelope, scheduled sends, and the Agent Accounts hot-swap reached from the header rate-limit indicator. * Document cross-task agent messaging in the task-lifecycle skill Adds a paragraph to the ask-to-launch section covering dev3 message --task seq:<N>, its scheduled form, and the one-inbox routing limit. Also refreshes ask-dev3: hibernation is now a first-class task action, so that story moves out of the tmux list and matches the shipped feature. * ask-dev3: refresh diff review, hibernation and message routing wording Per-comment Send to agent (#1237) and the self-clearing review (#1238) changed the review loop; hibernation now confirms and drops scrollback (#1215); message delivery is backend-neutral (#1216), so the one-inbox note no longer describes tmux focus order.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sending a large review to the agent used to fail, and the reviewer had to do the workaround by hand: dump the text into a file and paste the path into the agent instead. That workaround is now built in.
The real limit
Traced every hop from the button to the terminal. The binding constraint is our own guard, not tmux or the agent's paste path:
TaskDiffViewersend handlerssendAgentMessageNowRPCscheduled-message-scheduler.ts→validateTextMAX_SCHEDULED_MESSAGE_LENGTH= 10 000 chars — throwssend-keysargvARG_MAX, ~1 MB on macOSNeither transport chunks, but neither is reached —
validateTextrejects first.Change
sendAgentMessageNownow checks the payload against a newAGENT_MESSAGE_SPILL_THRESHOLD(8 000 chars — the 10 000 guard minus a 20% margin). Over it, the payload is written to<taskDir>/reviews/review-<iso-timestamp>.mdand the agent receives a two-line pointer naming that path. The RPC returns{ spilledPath }so the toast can say where the file went.The spill lives next to the git worktree, not inside it — a file inside would show up untracked in
git statusand inside the very diff viewer that produced it. It is removed with the task directory on cleanup.Doing this in the RPC handler rather than the renderer means all three send buttons inherit it: batch review send, per-comment send, and the GitHub PR-thread send.
Rationale and rejected alternatives in
decisions/198-oversized-review-payload-spills-to-file.md.Feedback from Alexander Kiselyov (review UX, item 2 of 3).