Skip to content

v2.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Aug 14:17
· 2 commits to main since this release

Faster Answers, No More "Hung" Chats

Speed is a feature. This release shaves real time off every single interaction — the first message in a new chat, every tool round in an agent loop, and the worst case that used to make chats look dead for minutes.

The Problem: Chats That Felt Hung

After a tool call (a file read, a build, a todo update), Cursor sometimes goes completely silent — no text, no reasoning, no error — for minutes on end. The proxy's stall watchdog gave post-tool resumes the same 180-second budget as a cold first message, so a genuinely stuck stream kept the session "running" for a full 3 minutes before recovery kicked in. One live session sat silent for 186 seconds after a todowrite call before the watchdog restarted the stream and the agent finished the task.

What's New

The stall budget is now phase-aware down to the tool loop:

Generation Phase Budget (v2.1) Budget (v2.2)
Cold start, model thinking before first token 180s 180s (unchanged — thinking is work)
Post-tool resume, no output yet 180s 90s
Reasoning flowing configurable configurable
Visible text paused 45s 45s

A model that called a tool seconds ago is working or stuck — a 90-second silence now triggers the verified-safe checkpoint rebuild, cutting the worst-case "hang" in half.

Plus three more wins shaved off everywhere:

  • H2 pre-connect — bridge workers establish their TLS/HTTP-2 connection to Cursor at startup instead of on your first request: the first message after a restart no longer pays the handshake.
  • Tool-call debounce 500ms → 250ms — OpenCode can only start executing tools once the stream closes; every tool round in an agent loop is now a quarter-second quicker.
  • Title-gen model persisted to disk — the ~2.5s Zen model probe no longer runs after every restart: titles resolve instantly from cache.

Measured

  • First message in a fresh chat, gpt-5.4-nano: 8.5s → 4.8s (−44%)
  • First message, cursor/default (auto-routed): 6.1s → 3.7s (−39%)
  • Follow-up turns (no tools): 2.4s
  • A 3-step file task with tool calls: 6.4s, zero stalls

Operational Notes

  • New knob: OPENCODE_CURSOR_POST_TOOL_PRE_OUTPUT_STALL_TIMEOUT_MS (default 90s) — read dynamically at runtime.
  • OPENCODE_CURSOR_TOOL_DEBOUNCE_MS (default 250ms) and OPENCODE_CURSOR_TITLE_GEN_CACHE_PATH give operators full control.
  • The 180s cold-start budget is untouched: slow reasoning models are never interrupted mid-thought.

Quality Assurance

38 smoke tests pass, including a new regression test that simulates a completely silent tool resume and proves the watchdog fires within the post-tool budget — plus hardened tests that eliminate a flaky keepalive-socket race in CI.

Upgrade, and feel the difference on the very first message.

Full changelog: v2.1.0...v2.2.0