mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-19 13:33:35 +08:00
Desktop sessions can prewarm before the user-selected runtime reaches the server, and an empty-session draft could previously persist an inferred default runtime as if the user had explicitly selected it. The fix keeps new-session defaults implicit while preserving explicit draft selections, and waits for queued runtime restarts before the first turn is delivered to the CLI process. Constraint: Runtime selection is session-scoped and may arrive while prewarm or first-turn startup is already in flight Rejected: Always persist the current default provider/model into new sessions | this masks whether the user actually selected a runtime and can launch stale providers Confidence: high Scope-risk: moderate Directive: Do not send user turns across pending runtime restarts without re-checking the session runtime override Tested: bun test src/server/__tests__/conversations.test.ts Tested: cd desktop && bun run test -- src/pages/EmptySession.test.tsx Tested: git diff --check