openclaw - 💡(How to fix) Fix doctor: 'Multiple state directories' check is noisy on multi-user hosts [1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#68752Fetched 2026-04-19 15:08:01
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants
RAW_BUFFERClick to expand / collapse

Problem

On a host that legitimately runs OpenClaw as multiple Unix users (e.g. separate user accounts for separate agents on a single Mac Mini), `openclaw doctor` walking `/Users/*/.openclaw` reports every sibling user's state directory as a potential split-history concern:

``` ◇ State integrity │ - Multiple state directories detected. This can split session history. │ - /Users/colette/.openclaw │ - /Users/mark/.openclaw │ Active state dir: ~/.openclaw ```

Example: running as `gaston`, doctor reports both colette's and mark's home dirs even though those belong to completely separate users with completely separate agents. There is no actual split-history risk — the dirs belong to different OS users.

Proposal

One of:

  1. Ownership filter: only report sibling dirs when they are readable by the current user. Dirs owned by another `/Users/<user>` with `700` perms almost certainly belong to a different agent.
  2. Opt-in scope flag: `openclaw doctor --scope=home` to restrict to the current user's `$HOME/.openclaw` and skip the multi-home walk entirely.
  3. Suppression config: `doctor.ignoreStateDirs: ["/Users/colette", "/Users/mark"]` in openclaw.json to silence known-intentional sibling dirs.

Option 1 is probably the lowest-friction default.

Impact

Cosmetic. The warning is noise on multi-agent hosts; the actual state-split risk is zero when dirs belong to separate POSIX users. It pollutes `doctor` output enough that it drowns real findings when scripted (e.g. health-check reports).

Repro

  • Mac host running two OpenClaw agents as two separate users (`gaston`, `colette`).
  • `ssh gaston@host 'openclaw doctor'` → warns about colette's dir even though gaston can't access it.

extent analysis

TL;DR

Implement an ownership filter to only report sibling directories readable by the current user to mitigate false positives in openclaw doctor output.

Guidance

  • Consider implementing the proposed ownership filter to restrict reported directories to those readable by the current user, reducing noise in openclaw doctor output.
  • Evaluate the opt-in scope flag (--scope=home) as an alternative to restrict the scope to the current user's home directory.
  • If a quick fix is needed, using a suppression config (doctor.ignoreStateDirs) in openclaw.json can silence known intentional sibling directories, although this may require more maintenance.

Example

No code example is provided as the issue focuses on configuration or flag changes rather than code modifications.

Notes

The choice between the proposed solutions may depend on the specific use case and the balance between convenience and security. The ownership filter seems to be the lowest-friction default but may require testing to ensure it correctly handles all scenarios.

Recommendation

Apply the ownership filter workaround to reduce false positives in openclaw doctor output, as it appears to be the most straightforward solution that addresses the root cause of the issue without requiring significant configuration changes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix doctor: 'Multiple state directories' check is noisy on multi-user hosts [1 participants]