Repository navigation
Description
Parent: #11255
Problem
NemoClaw restores .openclaw/openclaw.json to 2770/0660 even when the interactive agent and gateway already use the same identity. Native OpenClaw doctor recommends and repairs these paths to 0700/0600, creating a persistent disagreement.
The audited same-user startup path invokes the shared normalizer and reapplies group modes. Group sharing remains necessary in separate-user paths; this issue removes only the unnecessary behavior where shared ownership is proven.
Scope and code to retire
- Use native private state modes for verified same-user managed paths, with existing runtime/lifecycle authority determining applicability.
- Remove group-mode restoration from eligible startup, one-shot, connect-shell and host-doctor paths. Relevant owners are the normalization contract, one-shot cleanup, shell normalizer, and host permission check.
- Retain the shared-state package patch wherever a separate gateway identity still requires it; prevent unnecessary activation on same-user paths.
- Replace tests that require reversing native modes with native diagnostic and state-write outcome checks for the eligible paths.
Security and compatibility
Do not consolidate all UIDs or change supervisor authority in this issue. Do not delete the mixed normalizer/one-shot helpers wholesale: signal forwarding, child reaping, exit status, config recovery, secret checks and active transaction protection remain required. Agent-controlled environment variables or names alone cannot establish eligibility. Ambiguous or separate-user paths retain their existing access contract.
Acceptance criteria
- Record effective agent/gateway identities and supported runtime/image versions before applying the narrower contract.
- On a fresh eligible sandbox,
openclaw doctor --lint --jsonreports no NemoClaw-induced state-permission findings on first attempt, without prior repair, suppression or post-command reversal. - Native
doctor --fix, repeated doctor, normal config edits and restart leave owner-only state usable and stable. The running gateway can persist settings and database writes. - Entry, exec and connect agree; one-shot signals, stdin and exit codes remain correct.
- Separate-user regression coverage proves gateway state access is preserved. Secret custody, identity stores, transaction safety and restoration remain intact.
Related work
Closed #4538 and #6047 preserved the older group-sharing contract. Coordinate patch disposition with #5896 and OpenClaw migration #10694. Broader runtime identity design remains #11079.
Ownership and delivery
Core NemoClaw maintenance under the parent epic. The NemoClaw maintainers own the affected components; implementation remains unassigned. Apply this change to the existing supported agent/runtime combinations identified by the implementation.
Closure requires an actual net reduction in production code, the removed-function/branch/patch inventory, and passing native behavior plus existing security and recovery coverage. Source links record the audit baseline; inspect the implementation revision before deleting code.
Activity
refactor(openclaw): normalize native state permissions (#11309)