Skip to content

Spill oversized agent review payloads to a file and send the path - #1238

Merged
h0x91b merged 1 commit into
mainfrom
feat/dev3-review-payload-file-handoff
Aug 3, 2026
Merged

Spill oversized agent review payloads to a file and send the path#1238
h0x91b merged 1 commit into
mainfrom
feat/dev3-review-payload-file-handoff

Conversation

@h0x91b

@h0x91b h0x91b commented Aug 3, 2026

Copy link
Copy Markdown
Owner

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:

Hop Limit
TaskDiffViewer send handlers none
sendAgentMessageNow RPC none
scheduled-message-scheduler.tsvalidateText MAX_SCHEDULED_MESSAGE_LENGTH = 10 000 chars — throws
tmux send-keys argv OS ARG_MAX, ~1 MB on macOS
native PTY WebSocket frame no app-level cap

Neither transport chunks, but neither is reached — validateText rejects first.

Change

sendAgentMessageNow now checks the payload against a new AGENT_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>.md and 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 status and 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).

@h0x91b
h0x91b enabled auto-merge (squash) August 3, 2026 10:16
@h0x91b
h0x91b merged commit 154f7f5 into main Aug 3, 2026
9 checks passed
@h0x91b
h0x91b deleted the feat/dev3-review-payload-file-handoff branch August 3, 2026 10:17
h0x91b added a commit that referenced this pull request Aug 3, 2026
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.
h0x91b added a commit that referenced this pull request Aug 3, 2026
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant