docs(claude.md): document action sandbox vs internal workspace split#3241
Conversation
Adds a dedicated "Action sandbox vs internal workspace" section under Configuration explaining the action_dir / workspace_dir split that shipped in tinyhumansai#3074 but was never written down. Names the env override (OPENHUMAN_ACTION_DIR), the source-of-truth denylist (WORKSPACE_INTERNAL_DIRS / WORKSPACE_INTERNAL_FILES at policy.rs:173), the acting tools that resolve relative paths to action_dir (shell, node_exec, npm_exec, file_write, edit_file, apply_patch, git_operations, codegraph_*), and the precedence rule that overriding OPENHUMAN_ACTION_DIR does not weaken the internal denylist. Closes tinyhumansai#3239.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a documentation subsection to ChangesAction Sandbox and Internal Workspace Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Summary
action_dirvsworkspace_dirsplit shipped in feat(security): separate agent action sandbox from internal workspace state #3074 — previously only discoverable by readingSecurityPolicysource.OPENHUMAN_ACTION_DIRenv override, the default fallback chain (default_action_dir → default_projects_dir), and the precedence rule.WORKSPACE_INTERNAL_DIRS/WORKSPACE_INTERNAL_FILESatsrc/openhuman/security/policy.rs:173-202, surfaced viais_workspace_internal_pathatpolicy.rs:1097.Problem
PR #3074 introduced
Config.action_dir, the internal-state denylist, and the rule that acting tools (shell,node_exec,npm_exec,file_write,edit_file,apply_patch,git_operations) default their CWD toaction_dirrather thanworkspace_dir. None of this was written down —grep action_dir CLAUDE.mdwas empty.Concrete effect: a new contributor reading
CLAUDE.mdsaw the existing "Agent access mode" paragraph describingworkspace_only/trusted_roots/default_projects_dirand reasonably concluded thatConfig.workspace_diris still where the agent operates. That's wrong post-#3074, and audit follow-up #3239 flagged it as a doc gap against issue #3051 criterion 4 ("Projects alignment is documented").Solution
Adds a new "Action sandbox vs internal workspace" paragraph under
## Configuration, directly after the existing "Agent access mode" paragraph. The new paragraph:action_dirandworkspace_diras distinctConfigfields with the file pointer (src/openhuman/config/schema/types.rs).action_dir, notworkspace_dir.is_workspace_internal_path(policy.rs:1097) and the underlying constants (policy.rs:173-202) as the canonical denylist.OPENHUMAN_ACTION_DIRdoes not weaken the internal denylist;workspace_diris always blocked even ifaction_dirhappens to overlap.WORKSPACE_INTERNAL_DIRSin the same change.Surgical 7-line addition; no other content edited. Verified prettier on the new content (the pre-existing CLAUDE.md has unrelated prettier drift in table column alignment and blank-line-before-list rules; not in scope here).
Submission Checklist
CLAUDE.md, no executable behavior.Closes #NNNin the## Relatedsection.Impact
CLAUDE.mdis contributor documentation only, not bundled or loaded at runtime.Related
cwd_jailwiring), Update coding-agent prompts to reference action sandbox instead of "the workspace" #3236 (agent prompts), AgentAccessPanel should display live action_dir and workspace_dir via RPC #3237 (live paths inAgentAccessPanel), Add pwd-asserts-action_dir test for shell-family tools (unit + JSON-RPC E2E) #3238 (pwdtests), Make action_dir editable in Settings UI (currently env/TOML only) #3240 (Settings UI editor).AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
followup/3239-document-action-sandbox(on forkCodeGhost21/openhuman)c855cbffd3d2783501dde2a799223d7fdd437d89Validation Run
pnpm --filter openhuman-app format:check— N/A: pre-existingCLAUDE.mdprettier drift unrelated to this change; new content is prettier-clean in isolation.pnpm typecheck— N/A: docs-only.Validation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
CLAUDE.mddiscover the action sandbox / internal workspace split without grepping the policy source.Parity Contract
Duplicate / Superseded PR Handling
Summary by CodeRabbit