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): text generation no longer enters the planning tool loop by hfatih · Pull Request #44553 · pingdotgg/t3code

Conversation

@hfatih

@hfatih hfatih commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Problem

Cursor text generation creates a Plan-mode agent with the default toolset. As reported in #44550, a commit-message request can invoke CreatePlan, leaving only a prose preamble in the assistant reply and failing JSON decoding on both attempts.

Change

Use mode: "agent" and tools: [] for text-generation agents, as supported by the installed Cursor SDK 1.5.0. The shared constructor covers in-process execution and the SDK worker, including sandbox fallback and JSON retries.

Scope

Fixes #44550. Two files; interactive Cursor sessions, other providers, workspace/settings isolation and sandbox policy are unchanged. No dependency changes.

Verification

Extended the existing sandbox-fallback/invalid-output retry regression to check all three agent creation attempts:

Before: expected { mode: "agent", tools: [] }; received { mode: "plan" }
After: sandboxed attempt, unsandboxed fallback and fresh JSON retry all use agent mode with no tools
       generated subject: "Add generated commit message"
       3 agents created / 3 disposed; 2 prompt attempts

The regression failed on the unchanged implementation before applying the fix, then passed. The focused text-generation, SDK lifecycle and process-runner tests passed: 35 tests across 3 files.

vp run check:changed --concurrency 2 passed format, lint, both knip passes, typechecking for 10 affected packages and its targeted tests (17 tests passed).

These tests mock the external Cursor SDK boundary. A live Cursor account/model run and the original large-diff reproduction were not performed. No UI files changed; replay scenarios do not exercise Cursor-specific SDK behavior.

Sorry, something went wrong.

Uh oh!

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

All reactions
@hfatih
fix(cursor): keep text generation out of the planning tool loop
c982c0f
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 28, 2026
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: c49c996
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a0ac40eb-afc8-4662-ad65-2d4ac8c78a9b
Commits

Reviewing files that changed from the base of the PR and between c982c0f and 665f136.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Cursor text generation now creates agents in agent mode with an empty tools list. The sandbox-fallback test checks that each recorded agent creation uses these options.

Changes: Cursor text-generation configuration

Layer / File(s) Summary
Configure agent options and verify fallback
packages/provider-cursor/src/server/textGeneration.ts, packages/provider-cursor/src/server/textGeneration.test.ts
The agent options now use mode: "agent" and tools: []. The sandbox-fallback test asserts both options for every recorded agent creation.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

  • pingdotgg/t3code#32650: Disables tools for Cursor text-only runs and changes related retry and sandbox-fallback behavior.
  • pingdotgg/t3code#27715: Adds sandbox-disabled retries for SDK sandbox configuration errors in the same fallback path.

Suggested labels: bugfix

Suggested reviewers: yash-singh1, macroscopeapp

Merge Risk: Minimal · previous review c982c

Cursor text generation now creates agents in agent mode with built-in tools disabled, so the model should return JSON directly instead of calling plan tools. The change is small, it is covered by a test across the sandbox fallback and retry, and it can be reverted easily. Merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Cursor text generation no longer enters the planning tool loop. The raw summary shows the agents now use mode "agent" with an empty tools list instead of mode "plan". …
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections, and each section has specific content. It links issue #44550 and states the fix. Verification lists the …
Linked Issues check Passed Directly linked issue #44550 requires Cursor text generation to run without Plan mode or tool calls, so the model returns JSON in its assistant text. The reviewed diff changes agentOptions in `runCu…
Out of Scope Changes check Passed The whole-PR diff against the merge base touches only two files: textGeneration.ts (the two-line options change) and textGeneration.test.ts (a three-line assertion loop over all create calls). Both …
Full details: Title check

Explanation

The title names the main change: Cursor text generation no longer enters the planning tool loop. The raw summary shows the agents now use mode "agent" with an empty tools list instead of mode "plan". The title follows the conventional commit format and is specific.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections, and each section has specific content. It links issue #44550 and states the fix. Verification lists the focused tests, their results, and what was not checked, including the live Cursor run. The template asks for an agent or model line only when an agent did the work. The description does not include that line, and no agent attribution was given.

Full details: Linked Issues check

Explanation

Directly linked issue #44550 requires Cursor text generation to run without Plan mode or tool calls, so the model returns JSON in its assistant text. The reviewed diff changes agentOptions in runCursorTextGenerationWithStore (packages/provider-cursor/src/server/textGeneration.ts) from mode: "plan" to mode: "agent" and adds tools: []. The issue's suggested fix uses this exact configuration. The cwd, settingSources, and sandbox settings remain in the same options object, so they are preserved. The test in textGeneration.test.ts now asserts { mode: "agent", tools: [] } for every create call, covering the sandboxed attempt, the unsandboxed fallback, and the JSON retry. The change is coding-only and fulfills the issue's coding requirement. Limits: the tests mock the Cursor SDK, and no live Cursor run was performed. This does not affect the verdict, because the issue requirement is the configuration itself, which the diff establishes.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against the merge base touches only two files: textGeneration.ts (the two-line options change) and textGeneration.test.ts (a three-line assertion loop over all create calls). Both directly implement the #44550 objective. No unrelated files, dependency changes, or sandbox policy changes appear in the diff. The PR description states that interactive sessions, other providers, and workspace/settings isolation are unchanged, and the diff is consistent with that statement.

Finishing Touches

Generate unit tests (beta)

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

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: c0f45b6
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd7c2b5c-fd43-465c-9a7d-af3de385c2cc
Commits

Reviewing files that changed from the base of the PR and between c0f45b6 and c982c0f.

Files selected for processing: 2

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

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

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 28, 2026
@juliusmarminge @claude
Merge origin/main into fix/cursor-text-generation-no-tools
665f136
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge

juliusmarminge commented Nov 28, 2026

Copy link
Copy Markdown
Member

The automated pipeline stopped on this pull request and will not merge it:

the capture was not run as reported, so nothing is shown either way:

Added Cursor and selected Cursor Auto (default) as the text generation model. Staged an identical 9-file diff with 834 additions on each side. Clicked Commit in the Git panel without entering a message. Repeated three times per commit, restoring the same staged diff between requests. Every request generated a message and completed the synthetic commit. Displayed the final generated messages using git log in the app terminal. Inspected both recordings and stills; paired stills taken more than 500 ms apart were pixel-identical. Uploaded captures redact environment identifiers and crop out the sidebar. Servers, browser tabs, lease, scratch directory, and worktrees were cleaned up.

It stays open for a person to finish or close.

All reactions

Sorry, something went wrong.

Uh oh!

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

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Nov 28, 2026
@Yash-Singh1
Yash-Singh1 merged commit cd52c2a into pingdotgg:main Nov 28, 2026
57 checks passed

Uh oh!

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

@juliusmarminge juliusmarminge mentioned this pull request Nov 28, 2026
fix(cursor): text generation no longer fails when Cursor answers through CreatePlan #44559
Closed
@omegent-app omegent-app Bot mentioned this pull request Nov 28, 2026
Merge upstream main through 0f78747290a1 patroza/t3code#688
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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). takeover:blocked Takeover blocked; reason in the PR body vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Cursor text generation fails with "invalid structured output" because mode: "plan" triggers CreatePlan

Uh oh!

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

3 participants

@hfatih @juliusmarminge @Yash-Singh1
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.