Outside-Workspace Access
--allow-outside-workspace is a narrow switch for structured file tools, not a global filesystem policy. bash, plugins, and Hooks already run with user-process privileges and are not constrained by this option. Run CodeN in a container, virtual machine, or restricted account when strong isolation is required.
Default classification
Section titled “Default classification”read/write/edit targets are classified by the real path after symlink resolution (new files use the nearest existing real parent):
- Inside the workspace:
readis auto-allowed;write/editfollow the approval mode. - Outside the workspace: the risk escalates to
modify, confirmed per call or per session like an ordinary modification; under--autothe call returnspermission.outside_workspace_denied.
Explicit widening
Section titled “Explicit widening”coden --auto --allow-outside-workspace "your task"--allow-outside-workspacerequires--auto(using it alone is a configuration error).- It affects only the three structured file tools —
read/write/edit— permitting arbitrary writable paths outside the workspace. PreToolUseand the permission policy still run;dangerousrisk is unaffected by this switch.
Symlinks and TOCTOU
Section titled “Symlinks and TOCTOU”- Classification is based on canonicalization (resolving symlinks segment by segment, up to 32 levels), not the lexical path.
- Immediately before the operation the path is resolved and compared again (
revalidateStructuredFilePath): a change throwsworkspace.path_changed. - Links pointing outside the workspace classify their targets as outside; without
--allow-outside-workspacethey are handled as outside paths.
Unaffected parts
Section titled “Unaffected parts”bashruns with the workspace as its cwd but its access scope is not governed by this switch; it has user process permissions.activate_skillreads discovered, re-verified skill entries; skill resources (references/, etc.) read with ordinaryreadstill follow the outside-path rules.- User skills live in
~/.agents/skills/(outside the workspace): reading their resources with ordinaryreadalso requires confirmation or--allow-outside-workspace.
Failure modes
Section titled “Failure modes”| Scenario | Result |
|---|---|
outside access under --auto |
permission.outside_workspace_denied: rerun with --auto --allow-outside-workspace |
| resolution/escape failure | permission.workspace_denied (including workspace.symlink_escape/workspace.outside) |
| path changed before execution | workspace.path_changed |