Repository navigation
fix(agents): include OMP terminals in cold session restoration - #8991
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughOMP Pi status hooks now receive context and include 🚥 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 |
dfe9ebb to
5bf8c0a
Compare
OMP terminals report status through the managed Pi-compatible extension, but Orca never recorded OMP's provider session id, so a cold terminal restore (when the prior PTY cannot be reattached) could not build an `omp --resume <id>` startup command and fell back to an unresumed terminal — unlike Claude/Codex/Pi. Feed the existing sleeping-session/cold-restore pipeline the missing source fact instead of adding an OMP-specific path, reusing the session metadata transport that stablyai#8876 introduced for Pi resume: - For kind 'omp', refresh the shared `sessionMetadata` from the handler ctx (`ctx.sessionManager.getSessionId()`) on every event, and spread it into every posted payload. Unlike Pi (which resumes by transcript file and gates its metadata on that file existing), OMP resumes by id alone, so the latest handler-captured id rides every post as-is. Refreshing on every event matters because the transport keeps only the latest pending post and a session can switch within a process. Pi's generated source is byte-for-byte unchanged. - Add `omp` to `RESUMABLE_TUI_AGENTS`, parse its `session_id` in `extractAgentProviderSession`, and return `['omp', '--resume', <id>]` from `getAgentResumeArgv`. Warm daemon reattachment is unaffected: cold-restore consumption of the sleeping record is unchanged, so it still cannot launch a duplicate agent (stablyai#5232/stablyai#5240 invariant). Closes stablyai#8962
5bf8c0a to
3f12cfa
Compare
|
Rebased onto current main (cb9c42d) to adapt to the new session-metadata transport introduced by #8876: OMP now reuses the shared |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 7fba9a29-30b0-4ab0-8730-03a87c25b7ac
📥 Commits
Reviewing files that changed from the base of the PR and between 5bf8c0aee4149e4d6685f0c93f249c92d5306750 and 3f12cfa.
📒 Files selected for processing (3)
src/main/pi/agent-status-extension-source.test.tssrc/main/pi/agent-status-extension-source.tssrc/main/pi/agent-status-handler-source.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/pi/agent-status-extension-source.test.ts
|
Addressed this in What changed:
Local checks:
|
|
Bumping @Jinwoo-H |
OrcaWin
left a comment
There was a problem hiding this comment.
Reviewed the OMP cold-restore paths, custom session stores, WSL/SSH handling, persistence, mobile launch, and mixed-version fallback. Local validation and Electron reproduction passed; awaiting CI before merge.
…yai#8991) Preserve OMP session identity and exact resume paths across cold restoration, AI Vault, mobile, WSL/SSH, and host-authority routes. Add mixed-version fallback and completed-session recovery coverage.
OMP terminals report status through Orca's managed Pi-compatible extension, but Orca never recorded OMP's provider session ID. On a cold terminal restore (the prior PTY can't be reattached), Claude/Codex relaunch via
--resume <id>while OMP had no sleeping-session record and fell back to an unresumed terminal (#8962).This feeds the missing source fact into the existing sleeping-session/cold-restore pipeline rather than adding an OMP-specific path:
session_idfrom the extension context (ctx.sessionManager.getSessionId()) to every posted snapshot — it must ride every event because the transport keeps only the latest pending post and a session can switch within a process.ompis added toRESUMABLE_TUI_AGENTS;extractAgentProviderSessionparses itssession_id;getAgentResumeArgvreturns['omp', '--resume', <id>](matchingomp -r/--resume).Warm daemon reattachment is unaffected — cold-restore consumption of the record is unchanged, so it still can't launch a duplicate agent (#5232/#5240 invariant).
Tests: OMP round-trips through extract/resume-argv; the generated hook payload includes
session_idfrom the extension context (and omits it when absent).Closes #8962
X: @mark86202384100