Skip to content

fix(server): keep running after Cursor shell spawn failures - #13862

Merged
Yash-Singh1 merged 4 commits into
t3code/codex-turn-mappingfrom
t3code/fix-cursor-sdk-uncaught-shell-spawn
Sep 26, 2026
Merged

Yash-Singh1 merged 4 commits into
t3code/codex-turn-mappingfrom
t3code/fix-cursor-sdk-uncaught-shell-spawn

Conversation

@Yash-Singh1

Copy link
Copy Markdown
Collaborator

What Changed

Catch shell spawn failures from the Cursor Agent SDK so they do not terminate the server process.

Why

A failed shell spawn could otherwise bring down the server while handling a Cursor session.

UI Changes

Not applicable.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 26, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The PR changes process-wide unhandled-rejection behavior in the server and adds diagnostic-suppression directives in both production and test files. The production guard is narrowly targeted and covered by subprocess tests, but these changes require human review.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.4 KiB — 29.3 KiB ✅
Codex Live turn messages — 2 — 8 ✅
Claude Total thread wire — 4.9 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 20.8 KiB — 29.3 KiB ✅
Claude Live turn messages — 2 — 8 ✅

Baseline: unavailable · PR result: 6d0ccc6 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 106.1 KiB
  • Claude decoded thread snapshot: 106.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

The guard runs before the SDK loads, outside an Effect runtime, so its stderr print and the probe deadline stay on Node's own APIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Yash-Singh1
Yash-Singh1 merged commit bfb3501 into t3code/codex-turn-mapping Sep 26, 2026
24 checks passed
@Yash-Singh1
Yash-Singh1 deleted the t3code/fix-cursor-sdk-uncaught-shell-spawn branch September 26, 2026 20:29
@Yash-Singh1
Yash-Singh1 restored the t3code/fix-cursor-sdk-uncaught-shell-spawn branch September 26, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant