Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Environment: Cursor Desktop, macOS 25.2.0. Large monorepo. Coordinator branch diverged from origin/main (17 ahead / 13 behind).
Summary: Agent responses frequently cut off mid-stream — sometimes mid-sentence — before the turn completes. Frequency correlates with large working-tree/branch state.
What I expected: Turns stream to completion, or fail with a clear error and resumability. Per-turn context injection should be bounded.
What happens:
Agent begins responding normally.
Output stops abruptly, often mid-sentence, with no error surfaced.
Recurs across many turns in the same long-lived session.
Likely contributing factor: The <git_diff_from_branch_to_main> context block is computed against origin/main. On a diverged branch this is huge (in my repo: 185 files / ~13.7k lines) and is re-injected every turn regardless of relevance to the prompt. This appears to inflate per-turn payload and may interact badly with streaming.
Requests:
Robust streaming (retry/resume on truncation; surface an error instead of silent cut-off).
Cap or make-configurable the branch-diff injection; consider diffing against the local merge-base rather than remote origin/main, and truncating past a size threshold with a notice.
Repro reliability: Intermittent but frequent; scales with branch divergence / working-tree size.
Steps to Reproduce
Open Cursor Desktop on macOS with a large monorepo workspace (not sure if this is just a ‘me’ problem, ~thousands of files).
Use the coordinator checkout on main that has diverged from origin/main (in my case: 17 commits ahead, 13 behind).
Start a long-lived Agent chat (hub or spoke) and send normal multi-turn prompts (orchestration, code edits, /spoke, etc.).
Observe that each turn includes a large injected context block: <git_diff_from_branch_to_main> — in my repo this is ~185 files / ~13.7k changed lines, recomputed every turn.
Continue the session across many turns (10+).
Optional tighter repro (for a minimal case):
Same diverged main vs origin/main
Clean working tree (no uncommitted changes)
Single prompt: “Summarize what we should do next and list 5 concrete steps with rationale for each.”
Repeat 5–10 times; truncation is intermittent but frequent enough to block work.
Expected Behavior
Streaming completes — the agent finishes the full response, or fails with a clear, visible error (timeout, context limit, connection drop), not a silent mid-sentence stop.
Resumability — if a turn is interrupted, Cursor should offer retry / continue generation instead of leaving a half-written answer as “done.”
Bounded git context — <git_diff_from_branch_to_main> should be capped, summarized, or configurable, especially when the branch has diverged from remote. Prefer diff against local merge-base (or only uncommitted + recent changes), not the full ahead/behind delta on every turn.
User-visible signal — when context injection is huge, show something like “large branch diff attached (185 files)” so users can tell why turns are slow or failing.
No silent failure — mid-sentence cutoff should never look like a successful turn completion.
Operating System
MacOS
Version Information
Version: 3.10.20
VS Code Extension API: 1.125.0
Commit: 23b9fb205fe595ea2be29da7214e19762d037fc0
Date: 2026-07-07T07:03:33.071Z (1 day ago)
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.2.0
For AI issues: which model did you use?
Auto (though I am not sure what any subagents were using) - tried to parallelize
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor