Why Cursor Composer's Context Loss Cost Us a Production Deploy — And the 90-Minute Hard Limit We Now Enforce

During a Stripe migration, Composer lost the running tunnel and DB twice. 45 min recovery. We now hard-limit Cursor to <90 min sessions and use Codex for anything longer. Here's the incident timeline and the guardrail we built.

Published 2026-06-13

Why Cursor Composer’s Context Loss Cost Us a Production Deploy — And the 90-Minute Hard Limit We Now Enforce

TL;DR: Cursor Composer forgets running dev servers, tunnels, and DB connections after 60–90 minutes. During a production Stripe migration, it lost context twice — 45 min recovery. We now enforce a 90-min Cursor limit via timer alias; longer sessions auto-switch to Codex. Incident timeline →

The Context

Two-dev team. Cursor Pro since Jan 2026. Composer was our daily driver. Known issue: “Composer forgets context after a while” — but we’d only seen it on 2+ hr sessions. Assumed it was manageable. May 15, 2026 proved otherwise.

The Incident: Stripe Webhook Migration (May 15, 2026)

TimeEvent
10:00Start migration: 14 files, new webhook handler, idempotency keys
10:05stripe listen --forward-to localhost:3000/webhook (PID 8472)
10:07supabase db reset && supabase db seed — test data loaded
10:15–11:30Composer edits across 14 files; tests passing
11:32Composer stops responding; tunnel PID 8472 gone; Supabase connection dropped
11:32–11:45Recovery 1: Restart tunnel, reseed DB, re-explain schema, resume
11:45–12:40Continue edits; Composer seems stable
12:42Second context loss: tunnel + DB gone again
12:42–12:57Recovery 2: Same drill; morale tanked
12:57–13:30Finish migration in Codex (persistent) — zero further losses
13:30Deploy to staging → production. 45 min lost to context recovery.

Root cause: Composer’s context window management drops terminal state (PIDs, connections) when conversation history exceeds internal threshold (~90 min of active interaction). Not documented; discovered empirically.

What We Tested After

ToolSession LengthContext Loss?Notes
Cursor Composer60 min✅ NoneSafe zone
Cursor Composer90 min⚠️ IntermittentBoundary
Cursor Composer120+ min❌ ConsistentUnusable
Codex (persistent)5 hrs✅ NeverSurvives full day
Claude Code3 hrs✅ Session-onlyBut no persistence across restarts
Windsurf Cascade3 hrs✅ NoneGood alternative

The Pivot Point

May 15, 12:57 PM: Finished migration in Codex. Realized: we’d been treating Cursor as “the IDE” when it’s actually “the <90-min editor.” Built the guardrail that day.

What We Use Now

Hard 90-min Cursor limit (enforced via timer alias in shared dotfiles):

# ~/.config/chezmoi/dot_zshrc.tmpl
alias cursor='cursor-timer'
cursor-timer() {
  local limit=90  # minutes
  echo "⏱️  Cursor session limit: ${limit}min. Switch to 'cx' (Codex) for longer work."
  command cursor "$@" &
  local pid=$!
  (sleep $((limit * 60)) && notify-send "⚠️ Cursor 90-min limit reached. Save context & switch to 'cx'." && kill -USR1 $pid 2>/dev/null) &
}

Team Protocol (in AGENT_WORKFLOW.md):

  • Cursor: < 90 min only — quick edits, type-heavy work, LSP-dependent TS
  • 90-min timer fires → save, commit, switch to cx (Codex)
  • No exceptions. Two violations = Cursor removed from dock for a week (peer enforced).

Result: Zero context-loss incidents since May 15. Cursor still used daily — but only for what it wins at.

When You’d Choose Differently

  • Solo dev, short sessions only: Cursor alone is fine; no guardrail needed.
  • TypeScript-heavy codebase: Cursor’s LSP integration catches errors mid-edit — worth the 90-min dance if your sessions are naturally short.
  • Teams using Cursor Business: Admin can’t enforce session limits; relies on culture.

Tool Crucible Rating

DimensionRating (1–5)Notes
Overall3Great <90 min; hard ceiling after
Ease of Use4Best IDE integration; timer alias trivial
Value3$20/mo for <90-min tool; need 2nd tool for long work
Support3Context loss known issue; no timeline for fix

This is part of our AI Coding Tool Evaluation series. See incident timeline: Cursor Composer Context Loss: The 90-Minute Hard Limit We Enforce

Last reviewed 2026-06-13. See our methodology and affiliate policy.