Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 0a0df3a6439a5eb45bbfdb861b1a4dff7ba01059 and b61a4266993855fefaeb32ecb742bcdf9435c8c7. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughTightened 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
b3f5e0b to
0a0df3a
Compare
Sync update (
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 880893f1-9555-4823-8247-4add24811093
📥 Commits
Reviewing files that changed from the base of the PR and between 34f2a62 and 0a0df3a6439a5eb45bbfdb861b1a4dff7ba01059.
📒 Files selected for processing (2)
src/main/runtime/orca-runtime.test.tssrc/main/runtime/orca-runtime.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/runtime/orca-runtime.ts
b61a426 to
8ba1c9b
Compare
🧑🤝🧑 Impact & ELI5
1) What's broken today (ELI5).
Automation often does:
When Claude is slow to start,
tui-idlecan say “ready!” after a few quiet seconds before Claude has published any agent-status signal. The inject call still returnsinjected: true(it only proves PTY write), but Claude never consumes the prompt. The worker sits empty until a human/coordinator re-sends.This is a Claude recurrence of the class of readiness false-positives around #7748 / #7758, adjacent to Grok readiness reports, with incident evidence in #9976.
2) What this PR does (ELI5).
If Orca launched a known agent on that terminal (
launchAgentset, e.g. Claude), we no longer treat “quiet non-shell process for 3s” as idle. We wait for real readiness signals: agent status, ready-prompt body evidence, or an explicit idle OSC title.Anonymous/ad-hoc non-shell TUIs without
launchAgentstill use the old quiescence fallback (needed for agents that never publish status).3) Tradeoffs / regressions — honest answer.
--agent/launchAgentcreateTerminalwithoutlaunchAgent(e.g. barecodexcommand)--timeout-ms; if Claude never starts, wait times out instead of lying withsatisfied: true.No CLI API change, no UI change.
Summary
Bug: Slow Claude startup lets
terminal wait --for tui-idlesucceed before the first agent-status signal; subsequentorchestration dispatch --injectacknowledges the write but Claude never sees the prompt (#9976).Root cause: Fallback poll in
waitForTerminal/start*TuiIdleFallbackPoll:Claude is non-shell and can be quiet during cold start while still not ready.
Fix: Gate that quiescence path on
launchAgent == null:launchAgentset (Claude/Codex/… agent-first create) → do not idle on bare quiet; require status / ready prompt / explicit idle title.launchAgentunset → keep existing quiescence for title-less/ad-hoc agents.Applies to both leaf and PTY fallback polls.
Fixes #9976
Evidence
Automated
3/3 passed
resolves tui-idle for quiet background PTY agents without OSC titleslaunchAgent, non-shell quiet → still idle (no regression)does not resolve tui-idle via quiet non-shell foreground for launchAgent-backed terminals before statuslaunchAgent: 'claude', quiet startup → timeoutstill resolves tui-idle for launchAgent-backed terminals once agent status is idle✳) → satisfiedManual / incident mapping (#9976)
agent_startarrived after injectlaunchAgentis setterminal sendworkedCode map
startTuiIdleFallbackPolllaunchAgentstartPtyTuiIdleFallbackPollpty.launchAgentsetorca-runtime.test.tsELI5
Orca used to assume “Claude process is running and quiet for a few seconds” means “ready for the next command.” Sometimes Claude was still waking up. Now, when Orca itself launched Claude as an agent, it waits for Claude to actually signal readiness instead of guessing from silence.
User-regression-tradeoffs
--timeout-ms; behavior becomes more correct, not weaker.Checklist notes (CONTRIBUTING / AGENTS)
launchAgent+ status model on remote hosts.launchAgent-tagged create (Claude, Codex, Grok, …).launchAgent; no extra IPC when skipping.Test plan
Out of scope
TUI_IDLE_QUIESCENCE_MSgloballyAI code-review summary
Made for reliable multi-Claude orchestration 🐋