Repository navigation
Conversation
There was a problem hiding this comment.
Important
The new startup π - <session> - <cwd> title is accepted by the tui-idle explicit-idle lane with no quiescence and without a trustworthy screen, while OMP's native startup π > title is deliberately held back. A first-run OMP setup wizard can therefore be bypassed. Detail inline.
Reviewed changes
- Startup idle title —
session_startnow reads the hook context, skips non-UI and subagent sessions, and callsstopAnimation(ctx)whenctx.isIdle()is true, so an idle root startup publishes the managed rest title before the first turn. - Behavioral tests — the VM harness gained
hasUI/agent.kind; a positive startup-idle test covers bothompandpigenerator kinds and theiragent_start/agent_endtransitions, and a negative test pins the busy/sub/RPC exclusions.
The change is focused and the guard logic is correct: @oh-my-pi/pi-coding-agent@18.5.0's ExtensionContext does expose hasUI, isIdle(), and agent.kind (main/sub), and the managed extension is rewritten on every PTY spawn, so no updater change is needed. The one concern is how the readiness engine consumes the newly-published title.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
| ' clearOwnedTimers()', | ||
| ' resetPromptState()', | ||
| ' // Why: startup readiness needs an idle title before the first turn can be delivered.', | ||
| ' if (ctx?.isIdle?.()) stopAnimation(ctx)', |
There was a problem hiding this comment.
The new startup publication lands in the generic explicit-idle lane rather than OMP's guarded π > lane. The readiness engine accepts π - <session> - <cwd> with no quiescence and no screen requirement (readScreenInputVeto returning null does not veto), so a supervised first-run startup can settle on this title before or while the setup wizard opens and type the first task into it.
Technical details
# Startup `π -` title weakens the OMP setup-wizard guard
## Affected sites
- `src/main/pi/titlebar-extension-source.ts:258` — publishes the managed rest title at `session_start` when `ctx.isIdle()`.
- `src/main/runtime/tui-idle-evidence.ts:294` — `hasExplicitIdleTitle` returns READY_STRONG for `π -` with no age check.
- `src/main/runtime/tui-idle-evidence.ts:313-319` — the OMP-only `π >` lane that DOES require `TUI_IDLE_QUIESCENCE_MS` (3000ms) plus a screen read clear of the wizard.
- `src/main/runtime/terminal-wait-detection.ts:24-30` and `src/main/runtime/agent-state-rules/pi.json:5-11` — the `^π - ` anchor classifies the managed title as explicit idle.
- `src/main/runtime/screen-input-veto.ts:16-22` — the veto is `null` with no trustworthy screen, and `evaluateTuiIdle` only blocks on `true`.
- `src/main/runtime/omp-readiness-transcripts.test.ts:195-213` — asserts `π -` needs no screen because "A post-turn title cannot come from setup".
## Required outcome
- A startup `π -` title must not settle `tui-idle` before OMP's setup wizard can be ruled out. Either hold a `π -` title observed at `session_start` to the same age+screen requirement as `π >`, or establish with a captured transcript that the extension's `session_start` always runs after the wizard's alternate-screen paint.
## Suggested approach
- Add a readiness-level regression: a first-run `omp-18-setup` transcript with a startup `π - capture-cwd` and no trustworthy screen (`size: null`) must not settle; then make the fix satisfy it.
## Open questions for the human
- Does OMP 18.5.0 emit `session_start` only after the first-run wizard has painted the alternate screen on macOS? The readiness comments state OMP paints its idle title before the wizard, so the ordering is the crux.|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe session-start handler now skips contexts with no UI or a subagent kind. For other contexts, it clears owned timers and resets prompt state. If the context reports that the agent is idle, the handler stops the title animation. New tests cover idle main UI startup, subsequent agent start and end events, and contexts that do not publish a startup title. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change publishes the idle title for eligible sessions without a demonstrated regression. It is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Startup readiness remains conditional on confirmed idleness, with nested and non-interactive sessions excluded. No new access or privilege path was identified, but cleanup across changes in session context is not fully established. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 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 |

ELI5
Orca waits until OMP is ready before giving it a task. The managed title extension previously announced readiness only after a turn finished, but a fresh worker had not received its first task yet. This change lets a genuinely idle startup announce readiness immediately, without treating busy or nested sessions as ready.
What Changed
session_starthandler now receives the extension context and skips non-UI contexts and subagents.stopAnimation(ctx)to publish the existing rest title only whenctx.isIdle()positively reports idle.ompor legacypigenerator kind, busy/sub/RPC exclusion, and subsequent start/end transitions.Why
Orca 1.4.219 with OMP 18.5.0 on macOS arm64 can still time out at
agent_readinessbefore initial task delivery. Its installed positive idle-title path needs the managed rest title, whilesession_startpreviously only cleared state. Increasing the timeout cannot create a missing transition.This fixes the producer rather than broadening readiness evidence or generating a fake completed turn. No readiness timeout, activity/completion status hook, process-exit semantics, model/thinking settings, or platform-specific path is changed. Missing
isIdlesupport does not fabricate idle readiness.Related history: #24068 and #24295. Open #24196 addresses broader status/readiness behavior but does not change these titlebar generator/test files; this PR stays at the missing managed title lifecycle boundary.
Linked Issue
Fixes #25052
Visual Proof
Before/after actual OMP 18.5.0 startup evidence (terminal title/automation behavior, no Electron layout change). Each session used the generated extension in an isolated CLI invocation, had no first user turn, and exited after a short startup probe. Both contexts were genuinely idle:
Before
No generated rest-title publication occurred before exit.
After
Separately, the equivalent temporary local mitigation let an actual installed supervised worker reach
ready / input_acceptedin 6.36 seconds and execute real worktree commands. That confirms the reported installed failure path; it is not presented as an end-to-end test of an upstream Electron build.Testing
Results: 2 files / 88 tests passed, node typecheck passed, changed-file lint passed. Repository precommit oxlint/react-doctor/oxfmt checks also passed.
The isolated genuine startup smoke used:
Probe extensions were throwaway snapshots of generated code with startup-context/title logging and a 500ms exit timer; removed afterward. The installed extension and app were not changed by these runs. Unrelated existing MCP connection warnings appeared in both startups; no model request was made.
Exercised on macOS arm64. Windows/SSH, genuine concurrent subagent/RPC subprocesses, full Electron build, full repository suite, and a supervised launch against a rebuilt upstream app were not exercised; busy/sub/RPC boundaries were checked with generated-source execution. Existing session replacement, prompt cleanup, pending-end, settle, compaction, shutdown, and ownership regressions remain passing.
AI Disclosure
Implementation and coordination used OMP with
openai-codex/gpt-6.1-sol, medium thinking. A separate read-only OMP worker reviewed correctness. No model/thinking overrides were supplied for these workers; no project-specific.ompdirectory exists in this checkout.Review
Small generator lifecycle change; readiness safety guards and generated behavior tests are the primary review surface. The local user-owned workaround is intentionally not part of this PR and remains temporary until a release carrying the managed generator fix is installed.
Agent skill upstream boundary
Notes
No credentials, wire changes, new dependencies, or platform-specific code. Uses existing title-generation/painter behavior. No activity/completion report is emitted at startup.
Additional observed boundary: a separate installed supervised review worker returned
ready / input_accepted, but its task remained in the composer as a collapsed draft after startup. An explicit extra Enter submitted that existing draft and started work. This proves that accepted input is not proof of a first turn; it does not distinguish early editor readiness from paste/Enter ordering. The independent review approves only the missing idle-title producer transition, not end-to-end first-prompt delivery. This PR does not claim to repair that submission boundary.The published
@oh-my-pi/pi-coding-agent@18.5.0source package was also inspected:interactive-mode.tsinstalls key/submit handlers (2172–2173), starts/adopts the composer (2228–2235), marks initialized and renders (2273–2277), then initializes hooks (2339–2340);extension-ui-controller.tsemitssession_startat321–324. Its prepaint lease enables input on adoption. This establishes source-level input setup before the hook, but does not provide a captured paste/Enter timing trace for that stalled draft. Exact-version package provenance: https://registry.npmjs.org/@oh-my-pi/pi-coding-agent/18.5.0.Checklist
pnpm lint,pnpm typecheck,pnpm test, andpnpm build(CI to cover); targeted tests/node typecheck/lint passed locally