Repository navigation
acpmux: answer Claude Code's hook_callback with no decision, not an error - #27800
Conversation
Red on base: the adapter answers hook_callback with an error, which leaves a Claude Code turn waiting on a registered hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-bccf7407567fd7369876
…rror
Claude Code sends hook_callback for a hook its SDK host registered and
waits for the hook's output. An error reply left 2.1.310's turn without
its result; an empty hook output (success, {}) is a hook with no
decision and the turn goes on. acpmux registers no callbacks yet, so
every id gets that answer. mcp_message keeps the error reply.
Refs HQ#5226.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-bccf7407567fd7369876
|
Found 7 test failures on Blacksmith runners: Failures
|
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on dbc40b2 to compare; do not merge until green; see lane-rules |
|
Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at 4726523 SHIP
Validation limitation: reviewed |
|
Review (Codex gpt-6-astra, high, review box): SHIP at 4726523. Reds at this head, none from this PR (its diff is four acpmux Rust files under
Focused test: red at 0ba6837 (https://github.com/manaflow-ai/cmux/actions/runs/40985383240); green at head with all 125 |
A newer verdict blocks 748a783 (no independent SHIP at the head).
|
Review (Codex gpt-6.1-sol, high, fast): SHIP at 748a783 (the head after merging feat-cmux-next with the Release compile fix #27758). The change is the 4726523 that gpt-6-astra passed earlier; Sol stands in because Astra reviews were hanging on the model route (one sat for 39 minutes reconnecting, a review-box rerun ran 40+ minutes with no verdict), as the acpmux area allows.
Reds at this head, none from this diff (four acpmux Rust files under
|
|
Review (next-review patch-id; carried): SHIP at 845c9d8 The independent SHIP at 748a783 carries to this head: the PR's own change ( |
|
Shipped in:
|
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo, 2026-10-29: "i mean in addition like chatgpt read the docs and you guys can too/send more guys to read" / "we're not making full use of their features"
From the vendor docs study in HQ#5226, row 2: the Claude stdio adapter declines Claude Code's
hook_callbackcontrol request with an error.What was wrong
Claude Code sends
hook_callbackwhen a hook its SDK host registered ininitializefires, and waits for that callback's hook output before it goes on. The adapter answered everyhook_callbackwith{"subtype": "error"}. Probed against the real CLI (Claude Code 2.1.310, stream-json, callbacks registered forUserPromptSubmit,PreToolUseandStop):Stopcallback, and noresultcame in 400 s, when the probe gave up.successand an empty hook output{}: the turn ended with itsresultas usual.acpmux registers no callbacks today (
"hooks": {}), so this path is the protocol answer for any callback id the adapter does not know, and the base acpmux needs before it registers one.The fix
claude_stdio/hook_callback.rs: ahook_callbackgets{"subtype": "success", "request_id": …, "response": {}}, which Claude Code reads as a hook with no decision (nothing blocked, no context, the turn goes on). Nothing goes to the hub. Other unsupported control requests (mcp_message) keep the error reply.Follow-up, not in this PR: register real callbacks through this path. The first candidate is the
__bg-hookPreToolUsecommand hook (bg_hook.rs), which today spawns an acpmux process for everyBashcall; a callback would answer it in the adapter.Test
cargo test -p acpmux --lib claude_stdio::hook_callback_testsa_hook_callback_is_answered_with_no_decisionfails, the reply is the error (run).claude_stdio::test (125 passed):cargo test -p acpmux --lib claude_stdio::(run).Observed / Not run
Changelog
none
Agent session: agent session
🤖 Generated with Claude Code