Context
Child of #78. Depends on #116.
Changes
Add sandbox configuration validation during agent launch in spawn_agent():
When require_sandbox: true
Check for Claude Code's settings.json sandbox configuration at:
~/.claude/settings.json
~/.claude/settings.local.json
Parse just enough to look for {"sandbox": {"enabled": true}}. If not found, fail agent creation with a descriptive error explaining that sandbox must be configured in Claude Code settings.
When require_sandbox: false (default)
- If
skip_permissions is true and no sandbox config detected: log tracing::warn!
- If agent has no permission restrictions at all (no permission_mode, no tools, no allowed_tools, no disallowed_tools, and tool_policy is AllowAll): log
tracing::warn!
Implementation Notes
- Keep the settings.json check lightweight — no full Claude settings schema, just serde_json::Value navigation
- The check should be a helper function for testability
Files
Acceptance Criteria
Context
Child of #78. Depends on #116.
Changes
Add sandbox configuration validation during agent launch in
spawn_agent():When
require_sandbox: trueCheck for Claude Code's settings.json sandbox configuration at:
~/.claude/settings.json~/.claude/settings.local.jsonParse just enough to look for
{"sandbox": {"enabled": true}}. If not found, fail agent creation with a descriptive error explaining that sandbox must be configured in Claude Code settings.When
require_sandbox: false(default)skip_permissionsis true and no sandbox config detected: logtracing::warn!tracing::warn!Implementation Notes
Files
crates/orchestrator/src/manager.rs— validation inspawn_agent(), helper functioncrates/orchestrator/src/types.rs—require_sandboxfield (may already exist from Add permission mode and tool restriction fields to AgentConfig #116)Acceptance Criteria
require_sandbox: trueblocks launch when settings.json has no sandbox configrequire_sandbox: falselogs warnings but proceedsskip_permissions: truewithout sandboxcargo build --workspaceandcargo testpass