Repository navigation
Conversation
…agent command `orca terminal create --command "codex …"` (or `claude …`) never set launchAgent on the pane; it was only inferred later, reactively, from the agent's OSC title. A worker-start chained right after create therefore hit dispatch_input before any agent identity existed, took the open-loop submit delay instead of the agent-aware render gate, and stalled at agent_prompt_stalled (stablyai#17291). The CLI now reuses recognizeAgentProcessFromCommandLine to set launchAgent at creation time. Headless one-shots stay unrecognized: the shared recognizer already drops `claude -p`, and the Codex classifier rules out `codex exec` and its other non-interactive subcommands. Closes stablyai#17291 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe Merge Risk: ⚪ Minimal · up to This localized CLI change labels recognized interactive agents when terminals are created, improving immediate command handling without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description covers the required sections, explains the problem and solution, links issue Full details: Linked Issues checkExplanation The implementation meets issue
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: c7175775-a997-40a5-bac9-e54aa30db327
📒 Files selected for processing (2)
src/cli/handlers/terminal.test.tssrc/cli/handlers/terminal.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — the fix is correct for its stated goal and the tests actually fail without it. One rough edge worth a look before merge.
Reviewed changes
terminal createinferslaunchAgent—src/cli/handlers/terminal.tsruns the--commandthroughrecognizeAgentProcessFromCommandLineand forwardslaunchAgenttoterminal.create, with an interactivity gate only forcodex(viashouldUseRendererBackedCodexTerminal).- Handler tests — new
describe('terminal create CLI')assertslaunchAgentis set forcodex,codex --yolo,claude --model …and unset forcodex exec …,claude -p …,npm run dev, and no command. ExacttoMatchObject/not.toHavePropertyassertions, so they genuinely fail without the behavior.
ℹ️ Nitpicks
- The
codexinteractivity gate also drops a genuinely interactive codex launch when it arrives via a node entrypoint (node node_modules/@openai/codex/…): the shared recognizer resolves that tocodexviarecognizeNodeScriptEntrypoint, butshouldUseRendererBackedCodexTerminalreturnsfalsefor anodefirst token, solaunchAgentis left unset. Edge-case only (CLI users typecodex, not the packaged entrypoint), so this is informational rather than blocking.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…hAgent Review follow-up: the inference labeled every agent the shared recognizer returned, but only codex had its one-shot subcommands filtered, so `opencode run …`, `gemini -p …` or `aider --message …` would have been labeled and, through launchAgent, marked unattended. The gate is now the interactive claude/codex classification the renderer-backed path already uses; other agents stay unlabeled until the runtime infers them, exactly as before this change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found. The previous asymmetric-gating concern is resolved:
launchAgentis now restricted toclaude/codexand requiresshouldUseRendererBackedInteractiveTerminal(command), so non-interactive agent commands (gemini,opencode run,aider --message) andclaude --versionstay unlabeled. The added test cases genuinely fail without this gate.
Reviewed changes
- Tightened the interactivity gate —
src/cli/handlers/terminal.tsnow requires both(recognizedAgent === 'claude' || recognizedAgent === 'codex')andshouldUseRendererBackedInteractiveTerminal(command)before inferringlaunchAgent, replacing the codex-only gate. - Expanded negative tests —
src/cli/handlers/terminal.test.tsaddsclaude --version,gemini,opencode run "summarize", andaider --message "fix"to the "leaves launchAgent unset" cases.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

ELI5
orca terminal create --command "codex"starts Codex in a new pane but never tells the pane "this is Codex". Orca only figures that out later, when Codex changes the terminal title. If a script runsworker-startright aftercreate, the paste arrives before that happens, gets the generic "wait a fixed delay, then press Enter" treatment, and stalls. Nowcreaterecognizes the agent from the command line and labels the pane immediately.What Changed
src/cli/handlers/terminal.ts:terminal createruns the command throughrecognizeAgentProcessFromCommandLineand passeslaunchAgenttoterminal.createwhen an interactive agent is recognized. Headless one-shots stay unlabeled: the shared recognizer already dropsclaude -p, and the existing Codex classifier (shouldUseRendererBackedCodexTerminal) rules outcodex execand the other non-interactive subcommands.src/cli/handlers/terminal.test.ts:codex,codex --yolo,claude --model …setlaunchAgent;codex exec …,claude -p …,npm run devand no command leave it unset.Why
#17291 traced it against source:
pty.launchAgentstarts null,pty.foregroundAgentis populated only after an OSC title observation, andcreateAgentPromptRenderGatereturns the real echo gate only for a recognized agent. Aworker-start --terminal <handle>chained immediately afterterminal create --command "claude …"therefore takes the open-loop delay and reportsagent_prompt_stalled; any pause of a couple of seconds between the two commands makes it pass. Theterminal.createRPC already acceptslaunchAgent(the e2e fixtures use it); the CLI just never sent it. This is the fix the issue proposed, gated on the Codex classifier instead of the renderer-backed flag so remote clients get it too.Linked Issue
Closes #17291
Visual Proof
N/A — CLI-only; the pane created by
terminal create --command codexnow carrieslaunchAgent: codexfrom the start.Testing
Ran on Windows 11:
AI Disclosure
Written with Claude Code (Claude Fable 5.1) under direction of @Tauri-EPO.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Sends an already-supported optional RPC field, so old hosts ignore it. No platform-specific behavior; the recognizer handles
.exe/.cmdbasenames.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) —tc:cli, the handler tests and oxlint on changed files pass locally; full lint/build left to CI🤖 Generated with Claude Code