Summary
DevClaw startup/workspace scaffolding can silently create a fresh empty devclaw/projects.json when that file is missing.
If project registry state still exists in a legacy location, this creates a dangerous failure mode: DevClaw can appear to have "forgotten" all registered projects, not because state was truly deleted, but because startup minted a new empty canonical registry instead of failing loudly or forcing migration.
Why this matters
The project registry is the control-plane state for DevClaw. If it silently forks to an empty registry, users see symptoms like:
- projects seemingly disappearing after restart
- projects seemingly disappearing on new context/session loads
- channel routing no longer finding a project
- task/project tools behaving as if nothing is registered
Local downstream symptom
In local downstream investigation, the canonical registry path was:
/home/sai/.openclaw/workspace/devclaw/projects.json
At the time of investigation it contained an empty registry:
That may not be the only root cause in the field, but it exposed a real silent failure mode in workspace startup behavior.
Fault line
Current workspace scaffolding behavior creates devclaw/projects.json if it is missing.
That is fine for a truly fresh workspace, but unsafe when any legacy registry still exists at paths like:
projects.json
projects/projects.json
In that case, startup should not quietly create a blank canonical registry.
Recommended fix
Before creating a fresh empty devclaw/projects.json, DevClaw should:
- check for known legacy registry locations
- fail loudly if a legacy registry exists
- require migration / reconciliation instead of silently forking state
Status
I have a downstream local fix and regression tests for this guard.
I am holding the upstream PR until the rest of the root-cause trace is complete, in case there is an adjacent deeper fix worth including cleanly.
Summary
DevClaw startup/workspace scaffolding can silently create a fresh empty
devclaw/projects.jsonwhen that file is missing.If project registry state still exists in a legacy location, this creates a dangerous failure mode: DevClaw can appear to have "forgotten" all registered projects, not because state was truly deleted, but because startup minted a new empty canonical registry instead of failing loudly or forcing migration.
Why this matters
The project registry is the control-plane state for DevClaw. If it silently forks to an empty registry, users see symptoms like:
Local downstream symptom
In local downstream investigation, the canonical registry path was:
/home/sai/.openclaw/workspace/devclaw/projects.jsonAt the time of investigation it contained an empty registry:
{ "projects": {} }That may not be the only root cause in the field, but it exposed a real silent failure mode in workspace startup behavior.
Fault line
Current workspace scaffolding behavior creates
devclaw/projects.jsonif it is missing.That is fine for a truly fresh workspace, but unsafe when any legacy registry still exists at paths like:
projects.jsonprojects/projects.jsonIn that case, startup should not quietly create a blank canonical registry.
Recommended fix
Before creating a fresh empty
devclaw/projects.json, DevClaw should:Status
I have a downstream local fix and regression tests for this guard.
I am holding the upstream PR until the rest of the root-cause trace is complete, in case there is an adjacent deeper fix worth including cleanly.