fix(cursor): honor sessionId in init for multi-turn resume (MT-247)#58
fix(cursor): honor sessionId in init for multi-turn resume (MT-247)#58ivanzzeth wants to merge 1 commit into
Conversation
Cursor stream-json may emit camelCase sessionId without snake_case session_id. Mirror Claude adapter resolution so AgentRunner passes a real --resume id on continuation turns after the issue stays active (MT-247). Adds regression test with init payload using sessionId only. Co-authored-by: Cursor <cursoragent@cursor.com>
ivanzzeth
left a comment
There was a problem hiding this comment.
Review: PR #58 — MT-247 cursor session resume
Summary
3-line change to handle camelCase sessionId in cursor stream-json init payload, plus test fixture.
Analysis
- Fallback chain
session_id → sessionId → session.session_idcorrectly maintains backward compatibility - Test script
camel_session_init_scriptproducessessionId(camelCase) — verifies the parsing path
Note
PR #61 (fix/mt-247-agent-handoff-states) includes the exact same cursor adapter change plus the additional handoff fix. One of these should be closed to avoid merge conflicts.
Recommendation: Approve — but consider whether to close this in favor of PR #61 which contains both fixes for MT-247.
ivanzzeth
left a comment
There was a problem hiding this comment.
Review: PR #58 — MT-247 cursor session resume
Summary
3-line change to handle camelCase sessionId in cursor stream-json init payload, plus test fixture.
Analysis
- Fallback chain
session_id→sessionId→session.session_idcorrectly maintains backward compatibility - Test script
camel_session_init_scriptproducessessionId(camelCase) — verifies the parsing path
Note
PR #61 (fix/mt-247-agent-handoff-states) includes the exact same cursor adapter change plus the additional handoff fix for the same Linear issue. One of these PRs should be closed to avoid duplicate commits.
Recommendation: Approve — but check if PR #61 supersedes this one for the same MT-247 issue.
|
Superseded by PR #61 which includes the same fix plus the handoff-state handling for MT-247. |
Summary
system/initsession id the same way as the Claude adapter: acceptsession_idorsessionId, then fall back to the adapter-generated placeholder.--resumewith the real CLI session when only camelCase is present, so multi-turnAgentRunnerruns stay on the same thread while a Linear issue remains in an active working state.Test plan
mise exec -- mix test test/symphony_elixir/cursor_adapter_test.exs:39 test/symphony_elixir/cursor_adapter_test.exs:63mise exec -- mix test test/symphony_elixir/core_test.exs:1230(agent continuation with fake codex)Refs: MT-247
Made with Cursor