You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found during adversarial review of PR #6672 (fix for #6666/#6667).
handle_review_command (crates/zeph-acp/src/agent/slash.rs:143-170) dispatches its prompt via input_tx.try_send and returns EndTurn immediately, without ever calling acquire_prompt_channels/acquiring output_rx. It is dispatched at turn.rs:385-389, i.e. before the normal acquire-and-drain turn path.
Before PR #6672, the agent-loop events produced by this fire-and-forget /review prompt would leak into the next real session/prompt call and get consumed by its drain_agent_events, corrupting that unrelated turn — this is very likely the actual real-world trigger for #6667, more so than the abort-mid-drain scenario the issue was originally framed around.
After PR #6672's fix, acquire_prompt_channels now drains any queued events at acquire time, so /review's output is instead silently discarded rather than leaking into the next turn. This is a net improvement (no more turn corruption), but /review is now effectively a no-op from the operator's perspective — its output goes nowhere.
Expected Behavior
/review should either:
Go through the normal acquire_prompt_channels/drain turn path so its output is actually delivered to the client, or
Stop pretending to be a fire-and-forget prompt turn (e.g. dispatch synchronously and stream results back some other way).
Suggested Fix Direction
Route /review's dispatch through the same acquire+drain turn machinery used by normal prompts, or use a distinct mechanism if it's meant to be async/detached (e.g. send_notification, the same pattern already used by /clear).
Description
Found during adversarial review of PR #6672 (fix for #6666/#6667).
handle_review_command(crates/zeph-acp/src/agent/slash.rs:143-170) dispatches its prompt viainput_tx.try_sendand returnsEndTurnimmediately, without ever callingacquire_prompt_channels/acquiringoutput_rx. It is dispatched atturn.rs:385-389, i.e. before the normal acquire-and-drain turn path.Before PR #6672, the agent-loop events produced by this fire-and-forget
/reviewprompt would leak into the next realsession/promptcall and get consumed by itsdrain_agent_events, corrupting that unrelated turn — this is very likely the actual real-world trigger for #6667, more so than the abort-mid-drain scenario the issue was originally framed around.After PR #6672's fix,
acquire_prompt_channelsnow drains any queued events at acquire time, so/review's output is instead silently discarded rather than leaking into the next turn. This is a net improvement (no more turn corruption), but/reviewis now effectively a no-op from the operator's perspective — its output goes nowhere.Expected Behavior
/reviewshould either:acquire_prompt_channels/drain turn path so its output is actually delivered to the client, orSuggested Fix Direction
Route
/review's dispatch through the same acquire+drain turn machinery used by normal prompts, or use a distinct mechanism if it's meant to be async/detached (e.g.send_notification, the same pattern already used by/clear).Environment
acquire_prompt_channelschanged the failure mode from "corrupts the next turn" to "silently discarded" but did not fix the root cause.crates/zeph-acp/src/agent/slash.rs(handle_review_command, lines 143-170),crates/zeph-acp/src/agent/turn.rs(do_promptdispatch at lines 385-389,acquire_prompt_channels)Logs / Evidence
Found during independent adversarial critique of PR #6672 (finding N1). See PR #6672 review discussion for the full analysis.