GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(cursor): shell commands that exit non-zero are recorded as failed by saphid · Pull Request #29785 · pingdotgg/t3code

Conversation

@saphid

@saphid saphid commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Problem

When a Cursor agent runs a shell command that exits non-zero, such as a failing test run, T3 Code stores the command and its tool node as completed. The Cursor SDK (1.2.0) reports both a successful and a failed shell result as status: "success" and only carries the failure in exitCode. cursorToolFailed looked only at status: "error" and MCP isError.

The web and mobile work log already check exitCode first, so the icon is usually right. But the thread timeline returned by t3_thread_read (OrchestratorMcpService.timelineItem) gives each item's stored status, and its command text ($ cmd plus output) has no exit code. An agent reading a delegated Cursor thread sees the failed run as completed. Codex, Claude, Grok and ACP all store failed for the same command.

Change

cursorToolFailed now treats a shell result with a non-zero exitCode as failed, the same check Grok uses (xaiAcpExtension.ts: non-zero exitCode -> failed). Both the execution node and the command_execution turn item take their status from this function. Other tool types are unaffected. Nested subagent shell results already map a raw failure to an error.

Scope and approval

Very small, focused fix for an obvious bug, so no prior issue: 4 non-test lines in one function, matching what the other adapters already do, plus one row in an existing test.

Overlap search: nothing open touches this function or Cursor shell exit status. #21448 (merged) fixed unfinished Cursor tools reported as successful, which is a different path. #26592 (merged) covered subagent ls/lint/MCP results. #29748 is Cursor text-generation error detail.

Verification

  • Red on main: the extended projects Cursor tasks and unfinished tools case failed in all 5 rows with - "shell-exit-1": "failed" / + "shell-exit-1": "completed".
  • Green: vp test run src/server/adapter.test.ts in packages/provider-cursor gives 21/21 passed. apps/server CursorReplayFixtures.integration.test.ts gives 11/11 passed.
  • vp run check:changed: format, lint, knip, typecheck (10 packages) and tests all pass.
  • I confirmed the SDK mapping in @cursor/sdk/dist/esm/336.js (case "success": case "failure": return {status: "success", value: {exitCode, ...}}). I didn't run a live Cursor turn.

Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.

Created with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@saphid @claude @github-actions
fix(cursor): shell commands that exit non-zero are recorded as failed
4f07a45
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 3, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Nov 3, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Nov 3, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 4f07a45

Macroscope's review found this PR approvable — Cursor shell commands that exit nonzero will now be recorded as failed despite the SDK reporting success. The change affects outcome reporting without changing command execution or output.

No code changes detected at 7bd3800. Prior analysis still applies.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Cursor adapter now marks shell tool results with nonzero exit codes as failed, even when the SDK result status is "success". The lifecycle test covers a command that exits with code 1.

Changes: Cursor shell failure status

Layer / File(s) Summary
Nonzero shell exit handling
packages/provider-cursor/src/server/adapter.ts, packages/provider-cursor/src/server/adapter.test.ts
cursorToolFailed treats a successful shell result with a nonzero exit code as a failure. The lifecycle test verifies that the tool node ends with status "failed".

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: sunkenintime

Merge Risk: Minimal · up to 7bd38

Shell commands that exit nonzero are now reported as failed instead of completed. The change is small and tested, and no actionable merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: shell commands that exit non-zero are now recorded as failed. The raw summary says cursorToolFailed marks a shell tool call as failed when its exit code is nonzero, an…
Description check Passed The description follows the repository template. It has Problem, Change, Scope, and Verification sections, and each section has specific content. The Problem section explains the bug and the affected …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: shell commands that exit non-zero are now recorded as failed. The raw summary says cursorToolFailed marks a shell tool call as failed when its exit code is nonzero, and the description confirms this. The title follows a conventional commit format and is specific.

Full details: Description check

Explanation

The description follows the repository template. It has Problem, Change, Scope, and Verification sections, and each section has specific content. The Problem section explains the bug and the affected paths. The Change section explains the fix and why it matches other adapters. The Scope section explains why no issue is linked and lists overlap searches. The Verification section gives concrete test results, a red-then-green run, and a note on what was not checked. The template asks for an agent model and harness line, and the description includes one (Claude Opus 5.5 in Claude Code). Two items are weak. The Scope section does not link an issue, but it gives a reason for omitting one, as the template allows. The description also cites an SDK version and internal file paths, which is acceptable detail.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 2
  • Charged: $0.50
  • View usage details

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 382312a
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 37aef779-c3c8-4dd1-9704-7cd82fa4f05d
Commits

Reviewing files that changed from the base of the PR and between 4f07a45 and 7bd3800.

Files selected for processing: 2

  • packages/provider-cursor/src/server/adapter.test.ts
  • packages/provider-cursor/src/server/adapter.ts

Limit details: You’ve used all 10 included reviews currently available.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@saphid saphid mentioned this pull request Nov 3, 2026
fix(opencode): a command that exits non-zero is stored as failed, not completed #29824
Merged
@MarcoDotIO MarcoDotIO mentioned this pull request Nov 6, 2026
fix(cursor): subagent grep results in files and count modes are no longer empty #32220
Open
@saphid

saphid commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Review requested

Date (UTC) Reviewer Where
2026-11-13 Julius Discord DM

Logged so this PR shows when a maintainer was asked to review it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 14, 2026
@juliusmarminge @claude
Merge remote-tracking branch 'origin/main' into fix/cursor-hunt
7bd3800
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge
juliusmarminge force-pushed the fix/cursor-hunt branch from 0d1ebca to 7bd3800 Compare November 14, 2026 15:13
@juliusmarminge

juliusmarminge commented Nov 14, 2026

Copy link
Copy Markdown
Member

Evidence

Ran real Cursor (auto) against fresh, isolated dev servers on both commits. Requested exactly one node -e "process.exit(1)" execution, then asked a second Cursor thread to call t3_thread_read and quote the command timeline item. Both commands exited 1. Base stored completed in the command item, tool-call node, and MCP timeline; head stored failed in all three.

Environment: Linux, Chromium, 1280×800 CSS pixels, light theme. Images show the same crop of the real web thread pane.

Before After
382312aba8 7bd3800d52
Before: MCP command status is completed despite exit code 1 After: MCP command status is failed for exit code 1

Base runtime transcript · Head runtime transcript · Reproduction and collection script

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 14, 2026
@juliusmarminge
juliusmarminge merged commit 8871c26 into pingdotgg:main Nov 14, 2026
54 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 14, 2026
Pipyakas pushed a commit to Pipyakas/t3code that referenced this pull request Nov 15, 2026
@saphid @juliusmarminge @Pipyakas
fix(cursor): shell commands that exit non-zero are recorded as failed (…
0b11b50
…pingdotgg#29785)

Co-authored-by: Julius Marminge <[email protected]>
(cherry picked from commit 8871c26)
AIdoesmyjob pushed a commit to AIdoesmyjob/t3code that referenced this pull request Nov 15, 2026
@saphid @juliusmarminge @AIdoesmyjob
fix(cursor): shell commands that exit non-zero are recorded as failed (…
17e885e
…pingdotgg#29785)

Co-authored-by: Julius Marminge <[email protected]>
(cherry picked from commit 8871c26)
@AIdoesmyjob AIdoesmyjob mentioned this pull request Nov 15, 2026
Upstream sync 2026-11-15: 125 upstream fixes (pre-catch-up) AIdoesmyjob/t3code#32
Closed
@mfituri mfituri mentioned this pull request Nov 19, 2026
sync: upstream through 6b7027b1f4 (1251 commits) 1001-ai/1001-code#117
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@saphid @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.