Problem Statement
Autonomous reminder sessions cannot read or write files from the workspaces directory even though {workspaces_dir} is declared in the top-level GlobalReadRoots configuration. The daemon's autonomous session trust zone has a silent fallback bug — it only honors session-specific roots ({session_dir}, {project_dir}) and an undocumented "configured autonomous roots" path. It ignores GlobalReadRoots.
Exact Configuration
File: netclaw.json (top-level Tools object):
{
"configVersion": 1,
"Tools": {
"GlobalReadRoots": [
"{skills_dir}",
"{identity_dir}",
"{workspaces_dir}"
]
},
"Workspaces": {
"Directory": "/home/netclaw/.netclaw/workspaces"
}
}
Resolved paths:
{workspaces_dir} → /home/netclaw/.netclaw/workspaces
{skills_dir} → (resolved at runtime)
{identity_dir} → (resolved at runtime)
The problem: GlobalReadRoots works for main sessions but NOT for autonomous sessions.
Evidence
File Read Errors (4 occurrences)
At 15:20 UTC, session reminder_gotowebinar-triage-automation-v2_1782400811846 attempted to read dedup state:
Tool call: file_read (call=call_f118a59c3bda414f9b429639)
Path: /home/netclaw/.netclaw/workspaces/gotowebinar-last-run.json
Result: Error: autonomous session may only access files inside its session directory, project directory, or configured autonomous roots.
Shell Path Denied
At 15:22 UTC, the agent tried to find the state file:
Tool call: shell_execute
Command: find /home/netclaw -name "gotowebinar-last-run.json"
Result: Tool access denied: shell_path_outside_trust_zone
What the Agent Did Instead
Because it couldn't read the workspace file:
- Searched via MCP tool (TextForge) — which works, MCP tools aren't blocked by file trust zones
- Found 7 registration threads from 5 registrants
- Attempted to spawn code-analyst sub-agents for CRM lookup
- Never wrote the state file (no file_write success to
/workspaces/)
- Never sent Slack notification (no completion signal sent)
- Session ended mid-processing without completion signal → stuck forever
Main Session vs Autonomous Session Comparison
| Behavior |
Main Session |
Autonomous Session |
File read from {workspaces_dir} |
Allowed |
Blocked |
File write to {workspaces_dir} |
Allowed |
Blocked |
| Shell to paths outside session dir |
Allowed |
Blocked |
| MCP tool calls |
Allowed |
Allowed |
set_working_directory |
Allowed |
Blocked |
Why This Is Likely a Bug, Not a Config Issue
-
GlobalReadRoots exists and documents shared roots — The config has a GlobalReadRoots array explicitly at the top level of the Tools object. The intent appears to be "these paths are readable by ALL sessions." If autonomous sessions were meant to have separate roots, the config should have a dedicated AutonomousReadRoots or SessionRoots array.
-
No documented autonomous-specific config — There is no configuration section for autonomous session roots. The error message mentions "configured autonomous roots" but there is nowhere in netclaw.json to configure them.
-
Variables resolve correctly — {workspaces_dir} resolves to /home/netclaw/.netclaw/workspaces in the config. The agent isn't getting a "variable not resolved" error — it's getting a "not in trust zone" error.
-
Main sessions work — The same variable {workspaces_dir} works for main sessions, proving the variable resolution is correct.
-
No separate ReadFiles.Mode for autonomous — The AudienceProfiles.Personal.ReadFiles has "Mode": "All" which should override all restrictions. Autonomous sessions run under the Personal audience but the autonomous boundary (boundary:trusted-instance) seems to add an additional layer that ignores GlobalReadRoots.
Impact
This affects ALL autonomous reminder sessions, not just specific ones. Any reminder that:
- Needs to read/write files outside the session directory
- Uses
set_working_directory
- Reads state/configuration from workspace paths
...will fail or degrade gracefully. The agent will use MCP tools as a fallback but cannot maintain state or persist results.
Suggested Fixes
Fix 1: Bug Fix — Make GlobalReadRoots Apply to Autonomous Sessions
Modify the daemon to check GlobalReadRoots when validating autonomous file access, not just {session_dir} and {project_dir}.
Fix 2: Add Autonomous-Specific Root Configuration
{
"Tools": {
"GlobalReadRoots": ["{skills_dir}", "{identity_dir}", "{workspaces_dir}"],
"AutonomousReadRoots": [
"{workspaces_dir}"
],
"AutonomousWriteRoots": [
"{workspaces_dir}"
]
}
}
Fix 3: Use Session Directory for State Files (Workaround)
Move state files into the session directory structure where autonomous sessions have full access, then copy/merge with workspace file after completion in post-processing.
Related
Problem Statement
Autonomous reminder sessions cannot read or write files from the workspaces directory even though
{workspaces_dir}is declared in the top-levelGlobalReadRootsconfiguration. The daemon's autonomous session trust zone has a silent fallback bug — it only honors session-specific roots ({session_dir},{project_dir}) and an undocumented "configured autonomous roots" path. It ignoresGlobalReadRoots.Exact Configuration
File:
netclaw.json(top-levelToolsobject):{ "configVersion": 1, "Tools": { "GlobalReadRoots": [ "{skills_dir}", "{identity_dir}", "{workspaces_dir}" ] }, "Workspaces": { "Directory": "/home/netclaw/.netclaw/workspaces" } }Resolved paths:
{workspaces_dir}→/home/netclaw/.netclaw/workspaces{skills_dir}→ (resolved at runtime){identity_dir}→ (resolved at runtime)The problem:
GlobalReadRootsworks for main sessions but NOT for autonomous sessions.Evidence
File Read Errors (4 occurrences)
At 15:20 UTC, session
reminder_gotowebinar-triage-automation-v2_1782400811846attempted to read dedup state:Shell Path Denied
At 15:22 UTC, the agent tried to find the state file:
What the Agent Did Instead
Because it couldn't read the workspace file:
/workspaces/)Main Session vs Autonomous Session Comparison
{workspaces_dir}{workspaces_dir}set_working_directoryWhy This Is Likely a Bug, Not a Config Issue
GlobalReadRootsexists and documents shared roots — The config has aGlobalReadRootsarray explicitly at the top level of theToolsobject. The intent appears to be "these paths are readable by ALL sessions." If autonomous sessions were meant to have separate roots, the config should have a dedicatedAutonomousReadRootsorSessionRootsarray.No documented autonomous-specific config — There is no configuration section for autonomous session roots. The error message mentions "configured autonomous roots" but there is nowhere in
netclaw.jsonto configure them.Variables resolve correctly —
{workspaces_dir}resolves to/home/netclaw/.netclaw/workspacesin the config. The agent isn't getting a "variable not resolved" error — it's getting a "not in trust zone" error.Main sessions work — The same variable
{workspaces_dir}works for main sessions, proving the variable resolution is correct.No separate
ReadFiles.Modefor autonomous — TheAudienceProfiles.Personal.ReadFileshas"Mode": "All"which should override all restrictions. Autonomous sessions run under thePersonalaudience but the autonomous boundary (boundary:trusted-instance) seems to add an additional layer that ignoresGlobalReadRoots.Impact
This affects ALL autonomous reminder sessions, not just specific ones. Any reminder that:
set_working_directory...will fail or degrade gracefully. The agent will use MCP tools as a fallback but cannot maintain state or persist results.
Suggested Fixes
Fix 1: Bug Fix — Make GlobalReadRoots Apply to Autonomous Sessions
Modify the daemon to check
GlobalReadRootswhen validating autonomous file access, not just{session_dir}and{project_dir}.Fix 2: Add Autonomous-Specific Root Configuration
{ "Tools": { "GlobalReadRoots": ["{skills_dir}", "{identity_dir}", "{workspaces_dir}"], "AutonomousReadRoots": [ "{workspaces_dir}" ], "AutonomousWriteRoots": [ "{workspaces_dir}" ] } }Fix 3: Use Session Directory for State Files (Workaround)
Move state files into the session directory structure where autonomous sessions have full access, then copy/merge with workspace file after completion in post-processing.
Related
shell_no_trust_zone_roots#1244) — autonomous zone clamp was added in this PR, may be the code path that introduced this regression.