MiMo-Code icon indicating copy to clipboard operation
MiMo-Code copied to clipboard

Session ID injected in system prompt doesn't match actual session on disk

Open yikson opened this issue 5 months ago • 0 comments

Bug description

When resuming a session, the session ID injected into the system prompt does not match the actual session directory on disk. This causes checkpoint-writer to write to a non-existent path, and the session becomes invisible in the esume list.

Steps to reproduce

  1. Start a session, have a conversation with checkpoint-writer creating checkpoint files under sessions/ses_AAAA/
  2. Exit the session
  3. Resume the session — a new session ID ses_BBBB is injected in the system prompt
  4. Check disk: sessions/ses_BBBB/ does not exist; the actual checkpoint files are still under sessions/ses_AAAA/
  5. checkpoint-writer now writes to ses_BBBB (which may or may not get created), and the session doesn't appear in resume because the ID lookup fails

Expected behavior

The injected session ID should match the actual session on disk, so checkpoint-writer writes to the correct location and resume can find the session.

Actual behavior

  • System prompt session ID: ses_0e46f1d11ffeYZkaiDBfWOWQt6 — directory does not exist on disk
  • Actual session on disk: ses_0e4a646a0ffeGxBGoX3NRFBJEh — has full checkpoint.md with correct conversation content
  • checkpoint-writer targets the wrong (non-existent) path
  • Session is invisible in resume list

Environment

  • OS: Windows 11 (win32)
  • Claude Code version: @anthropic-ai/[email protected]
  • Shell: pwsh

yikson avatar Jul 01 '26 02:07 yikson