Repository navigation
Description
Problem
Changing the reasoning effort (/effort picker) mid-conversation resets the entire session — the conversation transcript, changed-files state, usage, and all per-session client state are torn down and a fresh session is created. Any in-progress work is lost.
This is operator-facing: you're deep in a task, open /effort, pick high (or max), hit enter, and the conversation is wiped — the new session starts from scratch on the same provider/model with the new effort tier.
Root cause
cmd/mecatui/ui/effort.go (chooseEffort) builds a client.ModelSelection carrying the current provider/model + the picked effort, then delegates to restartOnModel (cmd/mecatui/ui/models.go:295) — the SAME handoff the /models picker uses for a model switch.
restartOnModel does a full teardown/recreate:
endRun(cancels any in-flight run)resetSession(empties the conversation transcript + all stream-accumulated session state)CloseSession(old)→CreateSession(new, selector)(restartOnModelCmd)
So picking a new effort tier is treated as a session-restart event, not a live in-place change. This is because effort is applied at CreateSession time (ADR 0055: per-session re-mint via the engine factory), and the live session's adapter was built with the old effort — there's no in-place "re-mint the provider on the running engine" path.
Context
- ADR 0055 (
docs/adr/0055-reasoning-effort.md) — effort is a per-session server setting applied atCreateSession; the re-mint is per-session-engine-factory, never clone-and-swap-LLM. - This is the same class of problem as issue Model switch: optional context carryover into the new session #20 (model switch: optional context carryover into the new session), but specific to the effort axis — the model/provider are UNCHANGED, only the effort tier differs.
- Related: issue mecatui: open an existing session by ID (view its transcript) #245 (open an existing session by ID) — a durable session log would at least make the lost conversation recoverable.
Expected behavior
Changing effort mid-conversation should either:
- Carry over context into the new session (the
/modelsrestart-now path could optionally seed the new session's history from the old one — issue Model switch: optional context carryover into the new session #20's "optional context carryover"), OR - Warn before destructive restart — surface a confirmation (like
modelsConfirm) that the conversation will be reset, instead of silently wiping it on enter, OR - Re-mint the provider in place on the running engine (the deeper fix: a live effort change without a session restart — but ADR 0055 currently scopes effort to CreateSession).
The least-effort honest fix is probably (2) — a confirmation overlay mirroring modelsConfirm so the operator isn't surprised by the reset. The effort picker today skips the confirmation step that /models has and goes straight to restartOnModel on enter.
Repro
- Start
mecatui, have a multi-turn conversation. - Open
/effort, pick a different tier, press enter. - Conversation is gone; fresh session on the same model with the new effort.
Activity