Documentation Index
Fetch the complete documentation index at: https://mintlify.com/headroomlabs-ai/headroom/llms.txt
Use this file to discover all available pages before exploring further.
headroom learn analyzes your agent’s conversation history offline — scanning past sessions for recurring failure patterns (wrong file paths, missing modules, stubborn retry loops) and generating context that prevents them from happening again. It writes recommendations to the agent’s native memory files (CLAUDE.md, AGENTS.md, GEMINI.md) so the next session starts knowing what went wrong before.
headroom.learn_plugin entry point.
Flags
Write recommendations to context/memory files. Without this flag,
learn runs as a dry run — it prints what it would write but makes no changes to disk.Override the output file for recommendations (Claude Code only). Path is relative to the project root or absolute. Defaults to
CLAUDE.local.md (personal, gitignored). Pass CLAUDE.md to write to the team-shared file, or AGENTS.md / GEMINI.md for other agents.Project directory to analyze. Defaults to the current working directory. Cannot be combined with
--all.Analyze all projects discovered in the agent’s history, not just the current directory. Cannot be combined with
--project.Which coding agent’s history to scan. Defaults to External plugins installed via
auto, which detects all agents with data on this machine and scans all of them.headroom.learn_plugin entry point appear here automatically.LLM model used for failure analysis (e.g.
claude-sonnet-4-6, gpt-4o, gemini/gemini-flash-latest). Auto-detected from available API keys when not specified.Parallel workers for session scanning. Defaults to
min(cpu_count, 8). Use --workers 1 for serial processing.Only scan top-level main sessions, skipping nested subagent and workflow transcripts (Claude Code). By default all session types are scanned.
Verbosity learning
Pass--verbosity to switch from failure analysis to output-verbosity learning. This mode mines behavioral signals — interrupts, fast-skips, echo ratios — from past sessions to determine how concise the agent’s responses should be.
Learn the user’s preferred output verbosity from behavioral signals instead of analyzing failures. Prints the recommended verbosity level (1–4) and confidence.Verbosity levels:
- 1 — Skip ceremony (greetings, summaries)
- 2 — No ceremony and no echo (don’t restate what you were asked)
- 3 — Conclusions only
- 4 — Caveman/fragments — extreme brevity
With
--verbosity: let an LLM override the heuristic level. Requires an API key. Gives a more nuanced result at the cost of an LLM call. Cannot be used without --verbosity.Writing the verbosity level with
--apply is not enough on its own — the output shaper is off by default. When --apply is used, learn automatically hot-enables the shaper on any proxy that is currently running. For future proxy starts, set HEADROOM_OUTPUT_SHAPER=1 before headroom wrap or headroom proxy.What gets written
When--apply is set, learn writes a marker-fenced block to the target file. The block contains structured recommendations that tell the agent:
- Paths and modules that have historically caused failures
- Environment-specific facts (which test runner to use, where config lives)
- User preferences discovered from behavioral signals
- Patterns to avoid and alternatives to try first
learn --apply is idempotent — the block is replaced in place rather than appended again.