Repository navigation
Slash commands no longer leave a chat empty or stuck - #1489
Open
katulevskiy wants to merge 3 commits into
Open
katulevskiy wants to merge 3 commits into
katulevskiy wants to merge 3 commits into
Conversation
… or stuck Claude Code answers its built-in commands (/mcp, /model, /config, /login, /resume...) itself, with a synthetic assistant message that never streams. The adapter only showed streamed text, so those turns ended with no reply. The text of a synthetic reply is now shown; a synthetic failure stays an error part only. Codex refuses the commands Zeron does not run (/mcp, /permissions...). Sent between turns, the refusal tore the runtime down with neither a Steered nor a Done for the message, while the engine counted it as running. The refused message is now its own turn, ended errored with the reason, and the runtime takes the next message. The refusal says the command only works in Codex's own terminal app.
A command Zeron does not run (/mcp...) sent while a turn runs waits in the queue for that turn's end. The turn's end took one queued message: when it was the refused command, its turn ended at once and the message queued behind it waited for a turn end that never came. The queue now keeps going until a message starts a Codex turn, and a closed mailbox with nothing left running ends the runtime.
The streamed-text mark now resets at each turn's end: a turn cut off before its assistant frame no longer hides the next command's answer. A synthetic message the CLI wraps around an API error (is_api_error_message) and its "No response requested." placeholder are not shown as a reply, as the CLI hides them itself (checked in 2.1.332). A Codex steer builds its turn request once, not once to check and again to send.
jsgrrchg
approved these changes
Nov 26, 2026
jsgrrchg
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Pushed small follow-ups, a prompt queued behind a refused Codex command no longer gets stranded, streamed_text resets per turn, and API-error and "No response requested." synthetic messages don't show as replies. CI failures are unrelated; they're fixed on main by #1511.
This branch has not been deployed
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.
Typing a slash command such as
/mcpin a chat made the chat look bricked (user report).Cause
Claude Code. The CLI answers its built-in commands itself (
/mcp,/model,/config,/login,/resume,/permissions…), with no model turn. It writes a synthetic assistant message (model: "<synthetic>") and sends no stream events. The adapter only showed streamed text, so those turns ended in about half a second with no reply at all. Verified against CLI 2.1.326 with Zeron's exact flags and wire frames: lifecyclequeued/started, then the synthetic assistant frame, the replay, the result andcompleted.Codex. Zeron refuses the Codex commands it doesn't run (
/mcp,/permissions, …). A refused command sent between turns failedsteer_as_new_turn, and the runtime tore down without aSteeredor aDonefor that message, while the engine had already marked the chat working.Fix
claude/normalize.rs: a synthetic assistant frame that streamed nothing and carries noerrorshows its text as the reply. A synthetic failure stays a single error part, and a streamed reply isn't repeated.codex/mod.rs: the refusal check is split out ofstart_turn(turn_request). A refused message between turns is now its own turn:Steered, thenDone { Errored }with the reason. The runtime stays up for the next message. The refusal now reads "/mcp only works in Codex's own terminal app. Here, Codex runs /compact and /review."Both apps (zgx and GPUI) go through these adapters; no UI change.
Tests
claude::normalize::tests::a_local_commands_reply_is_shownanda_synthetic_failure_is_not_also_a_reply.tests/claude.rsa_command_the_cli_runs_itself_shows_its_reply: a fake CLI plays the frames captured from the real/mcp.tests/codex.rsa_refused_command_between_turns_ends_its_turn_and_keeps_the_runtime: one turn, then/mcp(refused, errored with the reason), then a normal message that still completes.Both end-to-end tests fail without the fix. With it,
cargo test -p zeron-harness --lib --test claude --test codexpasses: 534 + 46 + 52.Checked in a sandboxed engine and zgx app built from this branch:
/mcp,/modeland/logineach show the CLI's answer and the chat stays idle and usable.Screenshots
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.