Document action sandbox vs internal-workspace split in CLAUDE.md
Summary
Document the action sandbox vs internal-workspace split in CLAUDE.md so contributors discover the rules without reading SecurityPolicy source. Add a short subsection (under "Configuration" or "Command permission model") that names Config.action_dir, Config.workspace_dir, the OPENHUMAN_ACTION_DIR env override, and which dirs the agent is blocked from touching.
Problem
#3051 acceptance criterion 4 mentions documentation, and the issue's "Related" section explicitly lists CLAUDE.md as the contributor-facing entry point. PR #3074 shipped the code split (action_dir, workspace_dir, internal-state denylist) but did not touch CLAUDE.md: grep action_dir CLAUDE.md returns nothing.
Concrete effect: a new contributor reading CLAUDE.md sees the existing "Agent access mode" section describing workspace_only, trusted_roots, default_projects_dir — but no mention of action_dir. They reasonably conclude that Config.workspace_dir is still where the agent operates, which is wrong post-#3074. The autonomy/security paragraph also still says "The default projects home is ~/OpenHuman/projects (config::default_projects_dir...) — distinct from the hidden internal ~/.openhuman/workspace." That's now incomplete: the action sandbox path the tools actually use is Config.action_dir, which defaults to default_projects_dir() but is independently configurable.
Solution (optional)
In CLAUDE.md, under "Configuration → Agent access mode":
- Add
Config.action_dirto the list of relevant config knobs, with the env overrideOPENHUMAN_ACTION_DIR. - State plainly: "Acting tools (
shell,node_exec,npm_exec,file_write,edit_file,apply_patch,git_operations) resolve relative paths and default CWD toaction_dir, notworkspace_dir.workspace_diris reserved for internal product state." - List the blocked internal subtrees (memory, sessions, vault, etc.) — pointing at
is_workspace_internal_pathinsrc/openhuman/security/policy.rs:1097as the source of truth. - Note that overriding
OPENHUMAN_ACTION_DIRdoes not affect the internal denylist —workspace_diris always blocked even if it happens to live under the action root. - Cross-reference
default_projects_dir()as the default value ofaction_dir, and clarify that~/OpenHuman/projectsis both the trusted root and the default action sandbox.
Acceptance criteria
- [ ]
CLAUDE.mddocumentsaction_dir— config field, env override, role. - [ ] Tool routing rule stated — "acting tools default CWD to
action_dir, notworkspace_dir." - [ ] Internal denylist listed — the blocked subtrees and the source of truth (
is_workspace_internal_path). - [ ] Default-vs-override relationship clear —
action_dirdefaults todefault_projects_dir()but is independently configurable. - [ ] Diff coverage ≥ 80% — the implementing PR meets the changed-lines coverage gate (Vitest + cargo-llvm-cov, enforced by
.github/workflows/pr-ci.yml). (N/A if changes are docs-only — call out in the PR description so the bot allows it.)