Sessions & memory
Every conversation is durable. Each REPL turn snapshots the full conversation to ~/.hipmmcode/sessions/<id>.json, including the active model, agent persona, and legion — so resuming restores the whole working context.
Resume
hipmmcode resume # list recent sessions (current project)
hipmmcode resume sess_abc123 # restore by id (or any unique suffix)
hipmmcode resume daimao # restore by the name you gave it with /rename
hipmmcode -c # continue the most recent session
hipmmcode resume --all # list across every projectInside the REPL:
/sessions # list
/resume sess_abc123 # hot-swap the current chat into a saved session
/resume daimao fork # resume as a NEW branched session
/rename refactor-sprint # give the session a memorable name (also an @ peer alias)
/peer list # list live sessions on this machine
/peer accept # accept held inbound cross-session mail
/branch # fork right here and keep going in the copy
/fork <prompt> # run a prompt on a background copy of the conversationv0.11.0+: /resume now restores the exact context gauge instead of showing 0% until the next turn. The last turn's real prompt-token count is persisted and restored on both --resume (launch) and in-session /resume, so the bottom bar shows the same percentage it had before the session closed.
Bare /resume opens the session picker — id, name (from /rename), age, and turn count per row:
› /resume Sessions this project · newest first ❯ refactor-sprint sess_9f2c… · 12 turns · 5m ago · deepseek-anthropic/deepseek-v4-flash daimao sess_a3b1… · 41 turns · 2h ago · anthropic/claude-opus-4-8 (unnamed) sess_77e0… · 3 turns · yesterday Enter resume · f fork · Esc cancel
Local @ cross-session (v1.0.1)
With two or more live HiPMMCode sessions on the same machine, @name sends a message to another session. This uses a local Unix socket — not a cross-machine bridge:.
/rename alpha # this session is now @able as alpha
@beta please review this diff
/peer list
/peer accept # or /peer refuse [id]Names must start with a letter and then use letters, digits, ., _, or - (max 32). Auto-generated first-message titles do not appear in @ completion, so the picker does not dump every conversation. Desktop sidebar rename is the same as /rename — no extra command.
Inbound policy:
| Setting | Effect |
|---|---|
crossSessionInbound=accept | Deliver immediately as a new user turn |
crossSessionInbound=hold | Hold until /peer accept or /peer refuse |
crossSessionInbound=refuse | Reject |
dialogExpiry defaults to 5 minutes (60s / 5m / 10m / never); override with HIPMMCODE_USER_DIALOG_TIMEOUT_MS. The inbound message starts a new turn instead of folding the previous reply into a process block.
Sending mid-generation keeps the already-streamed text. The new message runs now (Send now); later messages queue. Switching sessions does not drop an in-flight reply.
From v1.3.0, resume, rewind, import and export are panels inside the fullscreen terminal; nothing leaves fullscreen. A restarted terminal returns to the same session.
Fork & rewind
--fork-session(CLI) /fork(REPL) — branch into a new session id with copied history, leaving the original untouched./rewind [n](/checkpoint,/undo) — go back to an earlier point; choose to restore the conversation, the code, or both.--resume-session-at <n>— resume a session rewound to just after its Nth user turn.
Carrying on from your phone
With /rcl or /rc on, HM Bot on your phone carries on this session, and the conversation from before is synced over too. The phone can also carry on a conversation saved on the computer. See Remote control.
Context management
Long sessions hit model context limits. hipmmcode manages this on several levels:
- Context HUD — the status bar shows live pressure per turn:
[████░░░░░░] 42% 85k/200k, aware of each model's real window. /compact [focus]— summarizes history into a structured brief and replaces the log with a single compacted turn. Trades ~150K tokens for ~5K. Pass a focus (/compact the auth refactor) to bias the summary.- Auto-compaction (
autoCompactEnabled, default on) — compacts automatically when approaching the ceiling;autoCompactWindowforces it earlier. - Micro-compaction (
apiMicrocompactEnabled, default on) — silently evicts stale tool-result payloads first, which is much cheaper than a full compact. /context— token breakdown by category;/tokensfor totals;/costfor estimated spend.
Persistent memory
hipmmcode keeps a file-based memory per project under ~/.hipmmcode/projects/<key>/memory/:
MEMORY.md— the index, loaded into context each session.- One markdown file per fact, with frontmatter (
name,description,type: user|feedback|project|reference).
How memories get written:
| Trigger | Config |
|---|---|
/remember — extract from the recent conversation now | — |
On /exit / Ctrl+D | autoMemoryOnExit (default on) |
At the end of headless exec runs | autoMemoryOnExec (default off) or --auto-memory |
| After every turn | autoMemoryOnEveryTurn (default off; token-hungry) |
Reading: relevant memories are injected at session start. memoryRelevanceSelector=true uses a cheap model to pick the ≤5 most relevant files instead of the token-overlap heuristic. Manage files with /memory list and /memory <name> (opens your editor). Master switches: autoMemoryEnabled=false or HIPMMCODE_DISABLE_AUTO_MEMORY=1.
The model can also save memories itself mid-conversation via the SaveMemory tool.
Compatible memory layout
Project memory is also read from ~/.claude/projects/<key>/memory/ when present, so an existing memory tree keeps working.
Project instructions
At session start hipmmcode loads project instructions from the workspace: HIPMMCODE.md, AGENTS.md, CLAUDE.md (and .claude/CLAUDE.md, CLAUDE.local.md), plus rule fragments under .hipmmcode/rules/ / .claude/rules/. /init generates or improves the instructions file by scanning the project. Exclude patterns via instructionExcludes.
Transcripts & export
Ctrl+O//transcript— fullscreen transcript view./export [file]— write the conversation to Markdown./copy [n|all]— copy the last (or Nth, or all) assistant message to the clipboard./history— print the raw message log./recap— one-line session summary; an automatic "welcome back" recap appears after ≥5 min idle (awayRecap).
Cost tracking
hipmmcode cost # aggregate usage across saved sessions (this project)
hipmmcode cost --all # across all projects
hipmmcode cost --json # machine-readableIn-session, /cost gives live token + $ estimates.