# Prompt-history suggestions
Mission Control shows a dim completion of previously submitted prompts. Matching is an exact, case-sensitive prefix; frequently used prompts rank first, then recently used prompts.
- **Right Arrow**, at the end of the draft, accepts the visible suggestion. It remains editable and can be undone.
- **Escape** hides it until the draft changes.
- **Tab** and **Enter** keep their existing behavior. History is hidden while `/`, `$`, `@`, or `#` completion is open.
- Child and side-conversation prompts are excluded.
History is shared across sessions and linked Git worktrees, identified by the canonical common Git directory. Outside Git, it belongs to the current canonical directory. Open instances refresh at startup and after their own saved submissions, not continuously when another instance writes.
## Storage and privacy
Prompts and steering messages are remembered only after durable session saving—not drafts, failed submissions, automatic continuations, shell commands, or `--no-session` submissions. Steering is recorded from each original message after acknowledgement, not from the combined provider prompt. This version stores single-line prompts of at most 4 KiB, keeping up to 200 unique prompts per scope. Individual multiline messages are excluded. Prompts containing recognized absolute paths or detected secrets are excluded; this is not a guarantee that all sensitive text can be detected.
Files live under `$MC_HOME/state/prompt-history/` (normally `~/.magi-code/state/prompt-history/`), named by a SHA-256 hash of the scope path. Writes merge under a cross-process lock, replace files atomically, and use owner-only file permissions on Unix. Reads and writes run on existing workers, never during input handling or drawing. History failures do not block submitting prompts. Damaged files are left untouched.
## Disable, forget, clear
Start with `MC_PROMPT_HISTORY=0 magi-code` to disable both loading and recording. This does not delete existing history or session logs.
To forget stored prompts, close magi-code instances using the same storage directory first. In `state/prompt-history`, remove the relevant JSON file to clear one scope, or remove all JSON files to clear all scopes. To forget one prompt, remove its object from the file's `entries` array. Restart afterward. Session logs are separate and are not changed by clearing suggestion history.