This review recommends freezing the daemon + agent-runtime data boundary before v1.0 GA. Staff eng, tech leads, and security sign off below.
What happens when every surface guesses its own data root.
3 of 6 traced to a runtime writing outside RUNTIME_DATA_DIR — root cause, not symptom.
Each app resolves OD_DATA_DIR itself. Fast to ship, impossible to audit.
One JSON on disk every app reads. Removes drift but adds a second source of truth.
server.ts resolves OD_DATA_DIR once into RUNTIME_DATA_DIR; every path derives from it.
2wk → 5wk (+3wk) · PAY THE MIGRATION ONCE, NOT PER INCIDENT
OD_DATA_DIR is read exactly once, at daemon startup, into RUNTIME_DATA_DIR.
PROJECTS_DIR, ARTIFACTS_DIR, SQLite, MCP tokens — all constants of RUNTIME_DATA_DIR.
Subprocesses receive the resolved root as OD_DATA_DIR; adapters stop inventing their own.
If a change needs a data-path rule not covered here, request a core-maintainer decision — don't invent a new convention.