fix(cursor): pin session id and continue external tool results as userMessageAction - #1990
Conversation
Reuse the resolved conversationId as Connect x-session-id so transport rebuilds for the same client thread keep one session identity. Fall back to a random UUID only when no session identity exists. Native-exec/background shells use a separate per-transport owner (see follow-up commit).
…ction Drive external-model tool-result hops as userMessageAction so history-blob tool results stay visible without ResumeAction. Native models keep resumeAction. Live Connect probes informed this encoding choice; unit tests only lock the action case.
Independent review: do not claim the 429 diagnosis from unit tests, keep native-exec/background shells on a per-transport owner so overlapping turns cannot reap each other, and lock sessionId forwarding in adapter plus Connect header tests.
|
✅ Deterministic PR hygiene checks passed. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. |
|
Keeping this draft open — direction for whoever picks it up (maintainer decision): What is already on What this PR is still uniquely for: session-id pinning. The adapter still generates a fresh Constraints for the implementation:
After rebase, re-scope the PR description to session pinning only, then it can leave draft. |
fix(cursor): pin session id and continue external tool results as userMessageAction (lands #1990)
Summary
userMessageAction(results stay in history blobs). Native models keepresumeAction.x-session-idis pinned to the resolved conversation id so transport rebuilds for the same client thread keep one session identity. Native-exec / background shells use a separate per-transport owner.Rebase source commits:
0046816b3,4d5850e4d,e3c996586on currentdev(1645bb924).Verification
bun run typecheck— cleanbun run privacy:scan— Privacy scan passedbun run test— 12812 pass, 10 skip, 0 fail (826 files)bun test tests/cursor-live-transport.test.ts tests/cursor-adapter.test.ts tests/cursor-blob.test.ts tests/cursor-hardening.test.ts tests/cursor-transport-retry.test.ts— 147 passLive Connect probes informed the encoding choice; the unit tests only lock the action case, session-id forwarding, helper isolation, and shell-owner split. They do not claim to reproduce a 45k-token Connect reject.
Checklist
Review readiness checklist
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.