Repository navigation
Conversation
|
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 (10)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughCursor is now a resumable TUI agent. Resume logic extracts Merge Risk: ⚪ Minimal · up to Cursor conversations now persist and resume using their stable conversation ID after terminal exit, including completed-session recovery. The covered recovery and compatibility paths indicate the change is ready to merge. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description accurately summarizes the change and includes substantial validation details, but it omits the required template sections and information, including ELI5, What Changed, Why, Linked Issue with an issue number, Visual Proof or N/A, Testing checkboxes, AI Disclosure, Review, boundary confirmation, Notes, and Checklist. Resolution Rewrite the description using the repository template. Add the missing sections, provide a Linked Issue value after "Fixes #", state "N/A" with a reason for Visual Proof if no UI change exists, complete the Testing and Checklist items, and address cross-platform, SSH, security, performance, and AI disclosure requirements.
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.
ℹ️ No critical issues — two things worth confirming before this lands, plus one small nit.
Reviewed changes
cursoradded toRESUMABLE_TUI_AGENTS— flipsisResumableTuiAgent('cursor')and makesgetAgentResumeArgvproduce['cursor-agent', '--resume', <id>].- Hook extraction for
conversation_id—extractAgentProviderSessionnow reads aconversation_id(plus optionaltranscript_path) from Cursor's hook payload instead of returningnull. - AI Vault provider-session mapping —
getAiVaultAgentProviderSessionmaps a Cursor session'ssessionIdto{ key: 'conversation_id', id }. - Cursor-specific runtime capability — adds
agent-session.cursor-resume.v1and gates the remote host-authority resume path on it, mirroring the Kimi gate so older remote hosts keep the legacy fallback. - Tests — unit coverage for extraction/argv/store capture, and the force-exit e2e spec generalized into Codex + Cursor recovery cases.
ℹ️ Live capture depends on an unverified external field name
The recovery path only works if Cursor's hook body actually carries a top-level conversation_id. The extraction logic is unit-tested against a hand-built payload, but no test feeds a realistic Cursor hook body through the full normalize path, so the load-bearing external contract is currently unproven.
Technical details
# Cursor hook payload field name is the feature's load-bearing assumption
## Affected sites
- src/shared/agent-session-resume.ts:242-245 — reads `payload.conversation_id`; if Cursor emits the id under a different key (e.g. `conversationId`, or nested), `extractAgentProviderSession` returns `null` and live-session recovery silently never happens.
## Required outcome
- Confirm Cursor's `beforeSubmitPrompt`/`stop` hook bodies actually carry a top-level `conversation_id`, and pin it with a fixture.
## Suggested approach (optional)
- Add a `server-cursor-normalization.test.ts` case that passes a realistic Cursor hook body (with `conversation_id`) through `normalizeHookPayload` and asserts the resulting `providerSession` is `{ key: 'conversation_id', id }`. None of the current Cursor payload fixtures include `conversation_id`, so this path is untested end-to-end.ℹ️ Making Cursor resumable also opts it into hibernation, not just restart recovery
RESUMABLE_TUI_AGENTS is a shared gate. Adding cursor widens more than the restart path: idle done Cursor panes now become auto-hibernation candidates and gain live-resume anchors, which is broader than the PR title and body describe.
Technical details
# `RESUMABLE_TUI_AGENTS` is a shared gate with wider effects than restart recovery
## Affected sites
- src/shared/agent-session-resume.ts:5-21 — adding `cursor` flips `isResumableTuiAgent` globally.
- src/renderer/src/lib/agent-hibernation-pane-eligibility.ts:111-114 — idle `done` Cursor panes now become auto-hibernation candidates (previously excluded), and they get live-resume anchors.
## Required outcome
- Confirm auto-hibernation of idle Cursor panes is intended, since it will kill and later `--resume` the TUI on idle.
## Open questions for the human (optional)
- If `cursor-agent --resume <id>` resumes into a fresh turn and drops an in-progress composer draft, hibernation is more lossy for Cursor than for agents whose resume restores in-flight state.ℹ️ Nitpicks
extractAgentProviderSession'scursorcase wraps the result inwithTranscriptPath, butgetAiVaultAgentProviderSessionreturns a bare{ key, id }, and Cursor resume ignorestranscriptPathentirely (Cursor is not a native-chat transcript agent). Consider droppingwithTranscriptPaththere for symmetry and to avoid implying the transcript is read.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
I would also highly appreciate a merge on this |
|
Hi @brennanb2025 this is the second contribution I've made that I think are overlooked or stuck in the pipeline? Would appreciate an update |
|
Hi @nwparker @AmethystLiang would appreciate some human response :) |
|
Thank you @edenaion for the Cursor conversation identity and restart/resume work. The independently reviewed successor #24670 has now merged as9a1bef48e4d78cdcab7758d604400f7601fd9dbb and retains explicit credit to your PR. Its exact-head hosted checks passed, including the existing restart dispatch tests and cross-version host checks. Closing this predecessor after the replacement merge; authenticated Cursor continuation and broader native Chat/history acceptance remain separately scoped. |

Cursor tabs currently lose automatic conversation recovery after the terminal process is gone because Cursor is excluded from the resumable-agent list and its hook conversation ID is discarded.
Capture Cursor's stable
conversation_id, persist it through the existing recovery path, and resume withcursor-agent --resume <id>. Use the same identity for session history and advertise a Cursor-specific runtime capability so older remote hosts keep the existing fallback. Completed conversations retain their recovery checkpoint.Validation: 86 focused tests passed; Node, CLI, and web type checks passed; formatting and changed-file lint passed. The Electron force-exit/restart suite passed for both Cursor and the existing Codex case. These cases verify persistence and resume dispatch with a deterministic replacement command. A separate disposable real Cursor conversation resumed through the compiled command and retained its previous context across CLI processes. Local EZ-Verify push-tier verification passed.