_resolve_ccr_workspace hardcodes project_root_override=None, making --memory-project-root / HEADROOM_MEMORY_PROJECT_ROOT a dead workaround
Summary
The CLI documents --memory-project-root / HEADROOM_MEMORY_PROJECT_ROOT
(cli/proxy.py:617-624) as the escape hatch for clients that don't put a cwd:-style
line in the system prompt. But _resolve_ccr_workspace (proxy/handlers/anthropic.py:80-86)
hardcodes the value it's supposed to read from:
ctx = _CtxFor(
headers=dict(request.headers),
system_prompt=_extract_sys_prompt(body),
base_user_id=request.headers.get("x-headroom-user-id", ""),
project_root_override=None, # <-- hardcoded
)
ident = ProjectResolver().resolve(ctx)
storage_router.py:149-185's resolution order puts ctx.project_root_override as tier 3
(after the two headers, before the system-prompt scan) — but since it's always None here,
setting --memory-project-root / HEADROOM_MEMORY_PROJECT_ROOT has zero effect on CCR
workspace resolution. It presumably still affects the memory subsystem elsewhere, but not
the code path this option is documented to fix.
Effect
Users following the documented workaround for "my client doesn't send a cwd in the system
prompt" get no relief: CCR: workspace unresolved keeps firing regardless of the env var
or flag.
Suggested fix
Thread the actual configured project-root value into _CtxFor(project_root_override=...)
instead of the literal None.
Env: headroom-ai 0.28.0 (pipx), macOS.
Source: headroomlabs-ai/headroom