Skip to content

Add session persistence: tabs, transcripts, snapshots, and full assistant memory across restarts - #14

Merged
DevMando merged 1 commit into
mainfrom
feature/session-persistence-and-agent-memory
Jul 22, 2026
Merged

Add session persistence: tabs, transcripts, snapshots, and full assistant memory across restarts#14
DevMando merged 1 commit into
mainfrom
feature/session-persistence-and-agent-memory

Conversation

@DevMando

Copy link
Copy Markdown
Owner

Summary

MandoCode Desktop now remembers. Close the app mid-project and reopen it: your tabs come back with their folders and models, your conversations reappear in full, your snapshots are still in the panel — and the assistant itself genuinely remembers what was said and done, ready to continue as if the app never closed. Switching models mid-conversation can now carry the full conversation along instead of clearing it.

What's new

Everything restores on launch

  • Open tabs come back exactly as left: titles, project folders, per-tab models, and which tab was active. Folders that no longer exist are skipped gracefully.
  • Each tab's conversation transcript reappears in full — messages, diffs, command output — with a divider marking where the previous session ended. Stale status lines from the old session (connection notices, "ready" messages) are filtered out so they can't be mistaken for the new session's state.
  • Snapshots now survive restarts, and each records which project it came from (groundwork for grouping and search in the panel).

The assistant remembers

  • The model's full working memory is saved automatically at the end of every turn and restored on relaunch using the conversation API added in MandoCode 0.14.0. Restored assistants recall what they read, wrote, and ran — in testing, an assistant restarted mid-conversation accurately quoted its own earlier mistake when asked "what were you wrong about?"
  • If full restore isn't possible (older sessions, corrupted files), the app falls back to briefing the assistant with a text excerpt of the dialogue — and failing that, it tells the assistant honestly that a restored transcript exists which it cannot see, so it never guesses.

Model switches can keep the conversation

  • Switching models previously always cleared the conversation, offering only a summarized snapshot. The offer now includes "Keep memory": the same conversation continues on the new model, verbatim. Verified across different cloud providers, including conversations containing tool activity — and chained with a restart in between. The snapshot option remains for when a summary is the better fit (for example, moving to a smaller model).

Documentation

  • A new docs/session-persistence.md records the design: what survives where, the restore order, and the rule that guides future work — memory (verbatim, for continuing a conversation) versus knowledge (a snapshot, for carrying lessons elsewhere).

Why it matters

Until now, closing the app erased everything — layout, conversations, and the assistant's understanding of the work in progress. Users worked around it by manually importing snapshots. All of that is now automatic, and the same continuity extends to changing models mid-task.

Scope and risk

  • All persistence is best-effort and isolated: a failed write or unreadable file can never break a live chat — the worst case is a fresh start, which is exactly today's behavior.
  • Storage is local (per-user app data), written incrementally with size caps enforced during use, and cleaned up when tabs close or /clear is used — clearing removes the on-disk history too.
  • The submodule updates to MandoCode 0.14.0, which also brings date grounding (models no longer misread current events as fictional) and CLI session resume.
  • No changes to approvals, git integration, or the appearance system.

…agent memory

- Workspace shape (tabs, folders, models, active tab) restores on launch
- Snapshots persist to disk and record their project root
- Transcripts journal per session (append-only, capped) and replay on restore,
  with stale status chips filtered out of the replay
- Full-fidelity agent memory: history exports every turn end and rehydrates on
  restore via the new harness API — restored agents genuinely remember, with a
  plain-text tail-brief and an honest amnesia note as graceful fallbacks
- Model switches offer 'Keep memory' (verbatim continuation) alongside snapshots
- docs/session-persistence.md records the memory-vs-knowledge design rule
- Submodule pinned to MandoCode 0.14.0 (history API, --continue, date grounding)
@DevMando
DevMando merged commit 57be343 into main Jul 22, 2026
1 check passed
@DevMando
DevMando deleted the feature/session-persistence-and-agent-memory branch July 22, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant