Session Management
June 9, 2026 · View on GitHub
Nanocoder automatically saves your conversations so you can close the terminal and pick up where you left off. Sessions are saved in the background — you don't need to do anything special.
Resuming a Session
/resume # browse recent sessions with an interactive selector
/resume last # jump straight into the most recent session
/resume {id} # resume a specific session by ID
/resume {n} # resume by list index number
You can also use the aliases /sessions or /history.
Renaming a Session
/rename <new name> # rename the current session
The new name must be non-empty and 100 characters or less. If the name exceeds this limit, an error message is displayed in chat.
What Gets Saved
Each session captures:
- Full conversation history (all messages)
- Provider and model used
- Working directory
- Timestamps and message count
Sessions are saved every 30 seconds by default and retained for 30 days.
Storage Location
Sessions are stored in the platform-specific app data directory:
| Platform | Default Path |
|---|---|
| macOS | ~/Library/Application Support/nanocoder/sessions/ |
| Linux | ~/.local/share/nanocoder/sessions/ |
| Windows | %APPDATA%/nanocoder/sessions/ |
This can be overridden via the directory config option or NANOCODER_DATA_DIR environment variable.
Configuration
Customize session behaviour in your agents.config.json:
{
"nanocoder": {
"sessions": {
"autoSave": true,
"saveInterval": 30000,
"maxSessions": 100,
"maxMessages": 1000,
"retentionDays": 30,
"directory": ""
}
}
}
| Option | Default | Description |
|---|---|---|
autoSave | true | Enable/disable automatic saving |
saveInterval | 30000 | Milliseconds between saves (minimum 1000) |
maxSessions | 100 | Maximum sessions to keep (minimum 1) |
maxMessages | 1000 | Maximum messages sent to the model (context window capping) — on-disk history is NOT truncated (minimum 1) |
retentionDays | 30 | Auto-delete sessions older than this (minimum 1) |
directory | (platform default) | Custom storage directory |