Skip to content

Add session resume (--continue), a conversation export/import API, and date grounding#66

Merged
DevMando merged 2 commits into
mainfrom
feature/session-resume-and-date-grounding
Jul 22, 2026
Merged

Add session resume (--continue), a conversation export/import API, and date grounding#66
DevMando merged 2 commits into
mainfrom
feature/session-resume-and-date-grounding

Conversation

@DevMando

Copy link
Copy Markdown
Owner

Summary

MandoCode can now remember. This release adds session resume to the CLI — close MandoCode, come back later, run mandocode --continue, and the conversation picks up exactly where it left off. It also fixes a class of confusion where models treated real current events as fictional because they didn't know today's date.

What's new

Session resume (--continue / -c)

  • Every conversation is saved automatically at the end of each turn, per project folder, under ~/.mandocode/sessions/. Nothing to configure and no action to remember — saving is continuous, so even a crash loses nothing.
  • Starting MandoCode with --continue (or -c) restores the most recent conversation for the current folder, with a confirmation line showing how many messages came back. The restore is full fidelity: the model genuinely remembers what it read, said, and did — including the tools it ran — rather than receiving a summary.
  • If there is nothing to restore, MandoCode simply starts fresh and says so.
  • /clear deletes the stored session along with the live one — cleared means cleared.
  • The per-project storage layout leaves room for a future session picker (choosing among several past conversations, not just the latest).

Conversation export/import API

  • The AI service now exposes the serialization that powers --continue (ExportHistoryJson / TryRestoreHistoryJson). MandoCode.Desktop uses the same API for its session restore and its "keep memory across a model switch" feature, so both applications share one tested mechanism.

Date grounding

  • The system prompt now tells the model today's date. Without it, models whose training data ends in the past would read genuine recent news in search results as "future" content and dismiss it as fabricated — in testing, an assistant confidently concluded its own search tool was generating fiction about a real product announcement. With the date anchored, current events are treated as current events.

Why it matters

Losing the whole conversation every time the terminal closes was the CLI's biggest day-to-day friction, and the date gap quietly undermined trust in web search results. Both fixes make long-running work with MandoCode feel continuous and grounded.

Scope and risk

  • Saving is best-effort and isolated: a failed write or an unreadable session file can never break the chat — the worst case is starting fresh.
  • No behavior changes for users who never pass --continue, beyond the dated system prompt.
  • Command-line parsing now distinguishes flags from the project-folder argument in both places arguments are read.

DevMando added 2 commits July 22, 2026 00:17
…grounding

- AIService gains ExportHistoryJson/TryRestoreHistoryJson: full-fidelity conversation
  serialization (function calls included) for hosts that persist sessions
- New --continue / -c flag reloads the current folder's most recent conversation at
  startup; sessions save automatically at every turn end under ~/.mandocode/sessions
- /clear also deletes the stored session
- System prompt now carries the current date, so models stop misreading current
  events dated after their training cutoff as fabricated future content
- Launch profile added for debugging with --continue
@DevMando
DevMando merged commit 7200b81 into main Jul 22, 2026
@DevMando
DevMando deleted the feature/session-resume-and-date-grounding branch July 22, 2026 07:25
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