- Session forks and sharing:
/fork [name]switches to an independent copy, preserving messages, model, permission/thinking settings, tool policy, output style, and checkpoint metadata. In the TUI,/forkopens the same prompt list as/rewind, with a current-conversation option; plain mode uses/fork [name] --at <checkpoint index>to fork before a prompt.chanto -r <id> --fork-sessionforks on startup. Parent IDs and fork message indexes are saved;/resumeandchanto sessionsindent children beneath their parents. Forking does not restore working files. - Sessions and pull requests: when a command in a session prints a pull request's URL (GitHub, GitLab or Bitbucket, as
gh pr createdoes), the session remembers it.chanto --from-pr 42(or the PR's URL) resumes the newest session linked to it, looking in this project first, then in any project. - Portable transcripts:
/share [--no-tool-output]orchanto share [id] [--no-tool-output]writes~/.chanto/shares/<id>.htmland prints its path. The self-contained HTML includes light/dark themes, collapsible calls and tool output/diffs, model/date/token counts, and an embedded JSON transcript. Cost is marked unavailable because provider billing is not recorded. Secrets are redacted even when local redaction is disabled, home paths become~, and images and local checkpoint snapshots are omitted.chanto import-session <file.html|file.json>saves a fresh local session; continue with the printedchanto -r <id>command. An import keeps the transcript, title, model and usage, but not the file's settings (permission mode, thinking, tool policy, output style), linked pull requests, parent session or dates. A resumed session restores its saved mode, except bypass, which you choose again (--dangerously-skip-permissionsor shift+tab); a manageddefaultModeoutranks the saved one.
chanto share [id] --gist optionally uploads through your installed, logged-in gh CLI. It shows the exact HTML bytes and requires typing yes before invoking gh. Gists are secret by default, but anyone with the URL can access them. No upload occurs without this flag and confirmation.
- Checkpoints:
/rewind(oresc esc) restores a prompt checkpoint, including file changes made by Bash. Checkpoints survive session resume. The TUI shows how many files changed, were created, or were deleted and offers code and conversation, conversation only, or code only. In plain mode use/rewind <n> [both|conversation|code]./redoputs back what the last/undoor/rewindtook back (files and turns; repeat to step forward again) until you send the next prompt. - Editing an earlier prompt branches the conversation (as in Codex): in the TUI,
/rewind(oresc esc), pick the prompt, then Edit this prompt in a new branch (restore code too, or keep files as they are). The prompt's text goes into the input; edit it and press Enter (esccancels). Chanto forks a new session from just before that prompt, as/forkdoes, restores the files to that point when you chose code too (as/rewinddoes;/rewind undoin the branch brings them back), and sends the edited prompt there. The original conversation is untouched under its own id:/resumelists the branch indented under it. Elsewhere (plain mode, scripts):/edit-prompt <n> [both|conversation] [new prompt], numbered as/rewindlists the prompts; without a new prompt it just branches.
Snapshots use a private Git object store in ~/.chanto/history/<project-hash>/; the project's own Git index, HEAD, refs, and stash are untouched. Snapshots include working-directory files, including untracked files, while honoring .gitignore. Ignored files, .git, node_modules, target, .venv, and files over the size cap are excluded. Restoring removes newly created files and recreates deleted files within that scope. External side effects (databases, network calls, package caches outside the project, and Git pushes) are not undone. Snapshots run at each prompt and before mutating Bash calls; read-only shell calls skip the extra snapshot. A project's first snapshot stores every file, written as a single pack (a few seconds for 30,000 small files), and may take up to 30 s; later ones only re-read files whose size or modification time changed (well under a second for the same project).
If Git is unavailable or a snapshot exceeds its budget, a warning appears once and that checkpoint uses file-edit snapshots. This fallback covers Write/Edit/MultiEdit/NotebookEdit/apply_patch; Bash changes cannot be recovered by the fallback. Web UI and SDK file snapshots remain supported.
Configure snapshot limits in TOML:
[history]
max_file_bytes = 5242880 # 5 MiB per file
max_snapshot_bytes = 104857600 # 100 MiB total
timeout_ms = 2000 # deadline per snapshot
retention_days = 30 # keep objects referenced by recent saved sessionsCheckpoint metadata is stored with the session. Daily best-effort maintenance drops shadow refs belonging only to deleted or expired sessions and runs git gc --auto. Old unused project stores are removed during maintenance; checkpoints older than retention may no longer have code available for restoration.