Skip to content

feat: add CURSOR_PROGRESS_CONTINUATION opt-out - #201

Merged
oakimov merged 1 commit into
mainfrom
fix/progress-continuation-opt-out
Nov 23, 2026
Merged

oakimov merged 1 commit into
mainfrom
fix/progress-continuation-opt-out

Conversation

@oakimov

@oakimov oakimov commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Closes #186

@adonm, thanks for the A/B runs in #186. This adds the opt-out you proposed.

Change

  • CURSOR_PROGRESS_CONTINUATION set to 0, false, off or no (any case, surrounding whitespace ignored) turns off the follow-up Run opened when a tool-enabled turn ends with a short progress fragment. The turn then ends with that fragment and a normal stop. Any other value, or none, keeps today's behavior.
  • The check is part of shouldContinueProgressOnlyTurn, which runs after the steer branch. A steer Cursor did not take still gets its follow-up Run; tool turns and checkpoints are unchanged. It is read from the OpenCode process (or daemon) environment at each turn end and applies to both OpenCode majors.
  • Prompt caching: RequestContext and checkpoints are untouched. With the opt-out the turn simply skips the second Run.
  • test/preload.ts clears the variable for every run and fails a test that leaves it set, as it does for CURSOR_PROVIDER_CACHE_TTL_MS.
  • README environment table and progress-only note, Unreleased changelog.

Test cleanup from #197

The managed-spawn adapter test added in #197 (runs a managed spawn … in test/shell-timeout.test.ts) removed its temp root as soon as done existed. done appears before the supervisor fills it, and the job was still finishing its writes, so files came back and the TMPDIR leftover check failed. On macOS that broke every full bun test run here; each shell case leaked about one run in three on its own. The job's processes exit within milliseconds, so this is a race in the test, not a hang. The test now calls stopProcessesUsing(root) before removing it, as test/terminal-runner.test.ts does. #202 (for #185) carries the identical hunk so each PR passes on its own; whichever merges second merges it cleanly.

Verification

  • Predicate (test/progress-continuation.test.ts): on/off value matrix, and the default read from process.env.
  • Pump (test/display-bridge-pump.test.ts): by default a qualifying fragment opens exactly one follow-up and finishes once. With each opt-out spelling it opens none, emits the original text once and one stop finish, and keeps the checkpoint. Removing the gate fails those four tests.
  • Steers (test/early-steer.test.ts): with the opt-out, a progress fragment plus a steer Cursor did not take still sends the steer as the follow-up Run, without a nudge.
  • Isolation fixtures for the new preload guard (test/test-isolation.test.ts).
  • bun run typecheck, bun run build and bun test on main at 3dc9202, macOS: 3653 pass, 9 skip, 0 fail across 133 files.
  • Live A/B: your runs in Opt out of the synthetic progress-only continuation Run: CURSOR_PROGRESS_CONTINUATION=0 (with A/B token and run samples) #186, with the same gate on OpenCode 2.2.7.

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds CURSOR_PROGRESS_CONTINUATION to disable the synthetic follow-up after a short progress-only reply.

  • OpenCode can end a progress-only turn without a follow-up Run.
  • The managed-spawn test stops its processes before removing its temporary folder.

Reviewed 50b3ced5e68a2456fedecb524d42934695b80cea from the Linux workspace. The previous reviewed commit is not an ancestor, so this review covered the full PR. No actionable issues found. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "feat: add CURSOR_PROGRESS_CONTINUATION o..." · Reviewed by Greptile

@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Set CURSOR_PROGRESS_CONTINUATION to 0, false, off or no (any case,
surrounding whitespace ignored) to stop the follow-up Run the provider
opens when a tool-enabled turn ends with a short progress fragment. The
check is part of shouldContinueProgressOnlyTurn, so steers Cursor did
not take, tool turns and checkpoints keep their behavior. The default
is unchanged.

The test preload clears the variable for every run and fails a test
that leaves it set.

The managed-spawn adapter test now stops the job's processes before it
removes its temp root. It removed the root once `done` existed while
the job was still writing there, which left files behind on macOS.

Closes #186
@oakimov
oakimov force-pushed the fix/progress-continuation-opt-out branch from d6c83a5 to 50b3ced Compare November 20, 2026 15:19

oakimov commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

@adonm, could you retest #186 on 50b3ced using the same prompt from your report? If the model ends the turn with Checking the workspace, the default should open one follow-up Run. With CURSOR_PROGRESS_CONTINUATION=0 set before starting OpenCode, it should stop after the first Run and display the fragment once. Please share the OpenCode version, model, and Run count for each setting.

@oakimov
oakimov merged commit e022bcc into main Nov 23, 2026
11 checks passed
adonm added a commit to adonm/cursor-opencode-provider that referenced this pull request Nov 24, 2026
Adopt upstream's oakimov#199 pricing table, oakimov#200 in-place catalog refresh,
oakimov#201 CURSOR_PROGRESS_CONTINUATION opt-out, and oakimov#202 local AI SDK entry.
The fork's earlier ports (deb1787, 2bbab84, 9bf27b0 gate) are dropped
where upstream now covers the same ground.

Keep the fork-only pieces upstream still lacks: the seven-day conversation
snapshot default with fixed 24 h .tmp cleanup and resolver-derived test
ages, scripts/build-atomic.sh, scripts/sync-upstream.sh, the stale-dist
gate, and test/updater-build.test.ts.

Retire the last topic branch: nothing on perf/cache-ttl-and-lean-runtime
remains that upstream or this merge does not already cover, so TOPICS is
empty and the updater tests seed a synthetic topic into the copied script.
@oakimov
oakimov deleted the fix/progress-continuation-opt-out branch November 29, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opt out of the synthetic progress-only continuation Run: CURSOR_PROGRESS_CONTINUATION=0 (with A/B token and run samples)

1 participant