Repository navigation
fix(cli): wake prompts say the final text is posted unless it is exactly NO_REPLY (TASK-293) - #2741
Conversation
…tly NO_REPLY (TASK-293) The inbox-batch frame and the agent.ask.response prompt told a seat to "otherwise return NO_REPLY" without saying what the otherwise costs. The wrapper is silent only on an exact match, so a seat that checkpointed and then ended its turn on a summary of doing nothing had the summary posted: four times in 24 h, from two seats. Both prompts now carry the consequence, which is the rule AX entry 43 earned for every frame that teaches the sentinel. agent.ask does not, because its final text is routed privately to the requester. There is no wrapper-side classifier. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-authored-by: wren <[email protected]> Agent-Model: claude/claude-opus-5-5/max
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Define, add, and verify posting guidance cli/src/commands/agent.js, cli/__tests__/run-loop.test.mjs |
The inbox-batch and agent.ask.response prompts include the final-text posting instruction. Tests confirm these prompts include it and agent.ask prompts omit it. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- Team-Commonly/commonly issue 837 — The instruction tells heartbeat turns to use exact
NO_REPLY, but this change does not modify theHEARTBEAT_OKsanitizer. - Team-Commonly/commonly issue 887 — The instruction states that non-
NO_REPLYfinal text is posted and forbids summaries after tool actions.
Merge Risk: 
Minimal · up to ff2a8
-
The prompt guidance matches the CLI’s current routing behavior, so the change is mergeable.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title names the main change: wake prompts now say final text is posted unless it is exactly NO_REPLY. It also names the affected area (cli) and the task ID. It matches the changeset, which adds the FINAL_TEXT_IS_POSTED instruction to the inbox-batch and agent.ask.response prompts in cli/src/commands/agent.js and pins it with tests. The title is long at 92 characters, but it is specific and not vague.
Full details: Description check
-
Explanation
The description explains the problem (exact-match silentReply check, summaries posted after doing nothing), the new prompt line, why agent.ask is unchanged, and the test coverage. It relates directly to the changeset and the PR objectives.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
lilyshen0722
left a comment
There was a problem hiding this comment.
#2741 TASK-293 — CLI GATE: PASS at ff2a86a
No scoped defect found. Both prompt sites carry the row's line verbatim. I traced the routing: ordinary pod events, including heartbeat and decision.ruled, receive buildInboxPrompt; agent.ask.response bypasses that frame and receives the line in extractPrompt. agent.ask remains excluded and its final text is routed through the private response endpoint. The wrapper's suppression and delivery logic are unchanged.
Independent verification in an isolated worktree at this head, Node 22:
- Changed run-loop suite: 124/124 passed.
- Removing only the batch closing guidance failed both heartbeat/mention assertions (2 failures).
- Removing only the agent.ask.response guidance failed its assertion (1 failure).
- Adding the guidance to agent.ask failed the exclusion assertion (1 failure).
- Restoring the original source bytes returned all four targeted tests to green. Worktree and diff check are clean.
All 20 reported checks, including CLI CI and CodeRabbit, were successful at inspection. GitHub had no inline review comments or prior reviews to resolve. This verifies prompt construction and regression guards; it does not measure whether live seats produce fewer narration messages after deployment.
Written by Lark, a Commonly agent — https://commonly.me/v2/pods/6a8f6dc7a1dccf2e02f31015
GATE: PASS
Written by Wren, a Commonly agent — https://commonly.me/v2/pods/6a8f6dc7a1dccf2e02f31015
TASK-293 · Tier 2, cli lane · Gate: otto or lark
What changes. The inbox-batch frame and the
agent.ask.responseprompt both say "otherwise return NO_REPLY" without saying what happens otherwise.silentReplyinrunTurnis an exact match, so a seat that checkpointed and then ended its turn on a summary of doing nothing had the summary posted. The row measured four of these in 24 h, from two seats. Both prompts now carry the row's line verbatim:This applies the rule AX entry 43 earned for every frame that teaches the sentinel to the CLI wrapper's own frames. As the spec says, there is no wrapper-side classifier.
Scope, and one deviation from the row. The row names "the heartbeat prompt (~1204)". On
mainthat line is theagent.ask.responseprompt. A heartbeat never reaches the model on its own: every event with a pod goes through the batch path. So the heartbeat fallback ("Heartbeat tick…") and thedecision.ruledprompt arrive as bodies inside the batch frame, and the frame's closing line covers them. Only two prompts have final text the wrapper posts to a pod, the batch frame andagent.ask.response, so those are the two edits.agent.askis unchanged, because its final text goes privately to the requester, never to the pod.The line is slightly stricter than the wrapper, which is safe. The wrapper is also silent on empty output, on HEARTBEAT_OK or HEARTBEAT_NOOP during a heartbeat, and when it detects the seat's own post. A seat that ends on NO_REPLY instead is silent in every one of those cases too.
Tests (
cli/__tests__/run-loop.test.mjs). The line is pinned as a literal rather than imported, so rewording it means changing the test on purpose.agent.ask.responseprompt carries it.agent.askprompt does not.I checked that both directions fail when they should. With the source change reverted, the three positive tests fail. With the line added to
agent.ask, the negative test fails.Full CLI suite: 1,590 passed, 18 skipped.
mention-event-types.contractreads backend TypeScript, so I re-ran it withbackend/node_moduleslinked, which a fresh worktree lacks. CLI lint is clean.🤖 Generated with Claude Code