Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

Fix headroom learn writing ~/CLAUDE.md instead of ~/.claude/CLAUDE.md

chopratejas4bd778fb5773
diff --git a/headroom/learn/writer.py b/headroom/learn/writer.py
index 017cf7ac4..140e35b1c 100644
--- a/headroom/learn/writer.py
+++ b/headroom/learn/writer.py
@@ -140,6 +140,10 @@ class ClaudeCodeWriter(ContextWriter):
def _resolve_context_path(self, project: ProjectInfo) -> Path:
if project.context_file:
return project.context_file
+ # If project path is the home directory, write to ~/.claude/CLAUDE.md
+ # (the global location Claude Code reads) instead of ~/CLAUDE.md
+ if project.project_path == Path.home():
+ return Path.home() / ".claude" / "CLAUDE.md"
return project.project_path / "CLAUDE.md"
def _resolve_memory_path(self, project: ProjectInfo) -> Path: