Skip to content

fix(cursor): honor sessionId in init for multi-turn resume (MT-247)#58

Closed
ivanzzeth wants to merge 1 commit into
developfrom
fix/mt-247-cursor-session-resume
Closed

fix(cursor): honor sessionId in init for multi-turn resume (MT-247)#58
ivanzzeth wants to merge 1 commit into
developfrom
fix/mt-247-cursor-session-resume

Conversation

@ivanzzeth
Copy link
Copy Markdown
Owner

Summary

  • Resolve Cursor CLI system/init session id the same way as the Claude adapter: accept session_id or sessionId, then fall back to the adapter-generated placeholder.
  • Ensures continuation turns pass --resume with the real CLI session when only camelCase is present, so multi-turn AgentRunner runs 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:63
  • mise exec -- mix test test/symphony_elixir/core_test.exs:1230 (agent continuation with fake codex)

Refs: MT-247

Made with Cursor

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 ivanzzeth added the symphony Symphony orchestration related changes label May 9, 2026
Copy link
Copy Markdown
Owner Author

@ivanzzeth ivanzzeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_id correctly maintains backward compatibility
  • Test script camel_session_init_script produces sessionId (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.

Copy link
Copy Markdown
Owner Author

@ivanzzeth ivanzzeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_idsessionIdsession.session_id correctly maintains backward compatibility
  • Test script camel_session_init_script produces sessionId (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.

@ivanzzeth
Copy link
Copy Markdown
Owner Author

Superseded by PR #61 which includes the same fix plus the handoff-state handling for MT-247.

@ivanzzeth ivanzzeth closed this May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

symphony Symphony orchestration related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant