Skip to content

Audit and restore mecatui session reload fidelity #2114

Open

Description

@jbeda

Problem

Reloading or continuing a mecatui session restores the snapshot-derived conversation (user/assistant text and top-level tool calls/results), but not every visible piece of the live session. Known losses include reasoning/thinking summaries (already tracked in #2079) and the f6 Subagents, Parallel, and Teams inventories and their bounded activity. Other event-derived UI content may also disappear; we need an inventory rather than fixing only the examples we have noticed.

Production reload rebuilds from Conversation.Messages (cmd/mecatui/ui/sessions_surface.go, internal/adapter/server/transcript.go). Live delegation projections and reasoning deltas take separate paths. The activity EventLog is optional and not an authoritative, complete replay source under ADR 0217; reaching its end does not prove that history is complete. Provider-private reasoning replay data must not be rendered as the human-visible summary.

Scope

  1. Inventory meaningful live conversation and session-derived UI data across the conversation, tool details, Agents/Parallel/Teams, notices, usage, changed files, and other relevant views. For each item, identify its producer, durable authoritative source (if any), reload behavior, privacy/retention boundary, and the desired restore / refetch / explicitly unavailable decision. Distinguish session data from ephemeral UI focus, filters, scroll position, and spinners, which need not survive a process restart.
  2. Cover the known gaps: human-visible reasoning summaries (coordinate with Restore display-only reasoning summaries when reloading sessions #2079, without reusing provider-private replay fields); Subagent child inventory/usage/traces; Parallel branch and winner state; Team roster/member activity/tasks/findings. Check other live event-derived facts rather than assuming this list is exhaustive.
  3. For information we agree should survive reload, define an authorized, bounded durable read/projection contract that works for both embedded and server-backed sessions. Specify interrupted runs, compaction, forks/carryover, legacy snapshots, failed writes, redaction, and missing history. Do not silently reconstruct authoritative state from best-effort EventLog events or tool-result prose.
  4. Test a representative live session against a new client process/model rehydrated through the production transcript and metadata path. Assert parity for durable data and honest absence for data whose contract does not support restoration. Preserve pending-approval recovery's existing exact-run, fail-closed path.

Outcome

A reviewed state-source matrix and acceptance plan(s) for any persistence/API decisions, followed by fixes and regression tests. This omnibus tracks completeness across reload surfaces; #2079 owns the reasoning-summary-specific design and should be linked, not duplicated. Follow-on to #2089 and #1361.

Activity

  1. jbeda commented on Oct 5, 2026

    @jbeda
    ContributorAuthor

    From human review of #2078: aim for reload to replace server-owned session facts from an authoritative snapshot, rather than reconstructing or merging them from an old client projection. Where a desired fact is unavailable, show honest absence for now; decide explicitly what must survive reload in this issue instead of silently preserving stale client state. This is a design direction for the fidelity work, not an instruction to change #2078 during review. #2078's approved plan currently requires specific legacy fallbacks and preservation of view-only state; revising those promises would need an explicit contract decision.

    Please add to the state-source matrix the following candidate snapshot or authorized bounded-read data (not a mandate to put unbounded history into GetSession):

    • Human-visible reasoning/thinking summaries, with their durable source and privacy boundary. Coordinate with Restore display-only reasoning summaries when reloading sessions #2079; never render provider-private reasoning replay data as a substitute.
    • Subagent inventory and per-child status, usage, and bounded trace; Parallel branch identities, outcomes and winner; Team roster, member activity, tasks and findings. Current f6 projections are built from live events, not restored by the message-only transcript.
    • Structured tool-call/result details, changed-file summary, and meaningful durable notices/deliveries that the transcript cannot reconstruct. Decide per item whether to restore, refetch, or mark unavailable; do not assume transient spinner/progress text should persist.
    • Per-field absence semantics for legacy/incomplete data, including a confirmed empty/zero distinct from unavailable, plus a session-correlated version/ordering boundary so a late snapshot cannot overwrite a newer live fact.

    SessionSnapshot already projects title, mode/state, placement, resolved model, main and auxiliary usage, context occupancy, and capabilities (cmd/mecatui/client/session.go). Audit their source and completeness before adding more fields. Keep ephemeral local input/selection/focus/filters/scroll position outside the server session snapshot unless separately justified. For each proposed durable addition specify owner, retention/redaction, boundedness, interruption/fork/restart behavior, and a new-client-process parity test. An optional EventLog is not a complete authoritative snapshot.

    The model.go reload fields in #2078 mix request/feed ordering and retry state with conditional counter/legacy-fallback policy. Even if we simplify adoption, request/session/feed fencing is still needed to reject out-of-order responses; #2114 should distinguish that synchronization from merging session facts.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions