GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — fix(cursor): text generation no longer enters the planning tool loop by hfatih · Pull Request #44553 · pingdotgg/t3code Conversation
Contributor
ProblemCursor text generation creates a Plan-mode agent with the default toolset. As reported in #44550, a commit-message request can invoke ChangeUse ScopeFixes #44550. Two files; interactive Cursor sessions, other providers, workspace/settings isolation and sandbox policy are unchanged. No dependency changes. VerificationExtended the existing sandbox-fallback/invalid-output retry regression to check all three agent creation 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.
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
|
There was an error while loading. Please reload this page.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| 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
Suggested labels: bugfix
Suggested reviewers: yash-singh1, macroscopeapp
c982cCursor 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.
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.
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.
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.
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.
bd7c2b5c-fd43-465c-9a7d-af3de385c2ccpackages/provider-cursor/src/server/textGeneration.test.tspackages/provider-cursor/src/server/textGeneration.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[Bug]: Cursor text generation fails with "invalid structured output" because mode: "plan" triggers CreatePlan
There was an error while loading. Please reload this page.