Skip to content

mecatui: changing reasoning effort mid-conversation resets the whole session #246

Description

@JAORMX

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

Expected behavior

Changing effort mid-conversation should either:

  1. Carry over context into the new session (the /models restart-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
  2. Warn before destructive restart — surface a confirmation (like modelsConfirm) that the conversation will be reset, instead of silently wiping it on enter, OR
  3. 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

  1. Start mecatui, have a multi-turn conversation.
  2. Open /effort, pick a different tier, press enter.
  3. Conversation is gone; fresh session on the same model with the new effort.

Activity

  1. added theissue type on Jul 7, 2026
  2. added
    tui
    on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tui

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions