gsxdsm
2a9ae0aca3
FN-9109: add resilient cross-runtime Cursor fallback
Route eligible CLI fallback failures into one bounded, auditable Cursor runtime handoff.
- defer cursor-cli fallback selection until a retryable primary prompt failure
- serialize concurrent swaps, retry the primary after failed handoffs, and dispose replacements safely
- transfer text-only conversation context within strict turn and total character limits
- document routing behavior and cover provider, runtime, concurrency, and failure cases
Files changed:
.../fn-9109-cross-runtime-cursor-fallback.md | 7 +
AGENTS.md | 2 +
docs/cursor-cli-contract.md | 8 +
.../src/__tests__/cli-provider-routing.test.ts | 18 +-
.../cli-runtime-routing-conformance.test.ts | 64 ++++-
.../src/__tests__/cross-runtime-fallback.test.ts | 146 +++++++++++
.../engine/src/agents/agent-session-helpers.ts | 211 ++++++----------
packages/engine/src/agents/cli-provider-routing.ts | 4 +-
.../engine/src/agents/cross-runtime-fallback.ts | 277 +++++++++++++++++++++
packages/engine/src/util/run-audit.ts | 8 +
10 files changed, 602 insertions(+), 143 deletions(-)
Fusion-Task-Id: FN-9109
Fusion-Task-Lineage: 30664371-8410-4d6f-a263-cc86c8e0dc72
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 19:10:55 -07:00
..
2026-08-15 19:10:55 -07:00
2026-08-15 19:10:55 -07:00
2026-08-15 14:52:38 -07:00
2026-08-03 00:20:53 -07:00
2026-08-03 00:20:53 -07:00
2026-08-03 00:20:53 -07:00
2026-08-07 21:43:28 -07:00
2026-08-10 12:01:25 -07:00
2026-08-03 00:20:53 -07:00
2026-08-15 16:51:54 -07:00
2026-08-15 17:45:32 -07:00
2026-08-03 00:20:53 -07:00
2026-08-03 00:20:53 -07:00
2026-08-15 00:35:12 -07:00
2026-08-03 00:20:53 -07:00
2026-08-10 17:50:27 -07:00
2026-08-11 05:45:36 -07:00
2026-08-15 17:16:05 -07:00
2026-08-11 17:53:40 -07:00
2026-08-11 12:34:47 -07:00
2026-08-03 00:20:53 -07:00
2026-08-03 00:20:53 -07:00
2026-08-09 04:50:30 -07:00
2026-08-03 00:20:53 -07:00
2026-08-03 00:20:53 -07:00
2026-08-09 15:23:59 -10:00
2026-08-11 05:45:36 -07:00
2026-08-10 15:19:43 -10:00
2026-08-15 03:22:13 -07:00
2026-08-03 00:20:53 -07:00
2026-08-03 00:20:53 -07:00
2026-08-11 11:29:30 -10:00
2026-08-03 00:20:53 -07:00
2026-08-03 00:20:53 -07:00
2026-08-15 19:10:55 -07:00
2026-08-07 20:27:04 -07:00
2026-08-14 22:16:44 -07:00
2026-08-15 03:22:13 -07:00
2026-08-03 00:20:53 -07:00
2026-08-15 16:51:54 -07:00
2026-08-11 05:45:36 -07:00
2026-07-30 21:50:37 -07:00
2026-08-01 08:20:29 -07:00
2026-08-04 10:52:12 -07:00
2026-08-02 17:06:38 -07:00
2026-08-09 15:46:09 -10:00
2026-08-15 00:02:52 -07:00
2026-08-15 16:51:54 -07:00
2026-08-15 14:19:23 -07:00
2026-08-12 21:24:53 -07:00
2026-08-04 00:20:08 -07:00
2026-07-30 00:00:46 -07:00
2026-08-11 21:44:22 -07:00
2026-08-09 04:50:30 -07:00
2026-08-15 17:16:05 -07:00
2026-07-27 17:37:20 -07:00
2026-08-15 17:06:39 -07:00
2026-08-14 22:10:35 -07:00
2026-08-15 15:31:58 -07:00
2026-08-10 16:44:19 -07:00
2026-07-30 23:13:34 -07:00
2026-08-12 21:24:53 -07:00
2026-08-03 00:20:53 -07:00
2026-07-27 13:30:13 -07:00
2026-08-09 17:04:55 -07:00