Context
Part of the implementation plan for #20.
Order: 1 of 1
StrawPot agents are using Claude Code's built-in scheduling tools (CronCreate, CronDelete, CronList) instead of StrawPot's orchestrator-managed scheduling via denden. This creates "ghost schedules" invisible to the orchestrator. The fix is to pass --disallowedTools when building the claude CLI command.
Task
Add a --disallowedTools flag to the command constructed in cmdBuild() in claude_code/wrapper/main.go that blocks Claude Code's native scheduling tools.
Specifically:
- In
main.go → cmdBuild(), after the --dangerously-skip-permissions block (line ~243) and before the --add-dir block (line ~247), add:
// Disallow Claude Code's native scheduling tools — StrawPot manages
// scheduling through its own orchestrator (denden).
cmd = append(cmd, "--disallowedTools", "CronCreate,CronDelete,CronList")
- In
main_test.go, add a test TestCmdBuild_DisallowedSchedulingTools that:
- Calls
captureBuildOutput with minimal args (--agent-workspace-dir only)
- Parses the JSON output
- Asserts the
cmd array contains --disallowedTools followed by CronCreate,CronDelete,CronList using assertSequence
Pattern to follow: The --dangerously-skip-permissions implementation and its test (TestCmdBuild_DangerouslySkipPermissions_Default) are the closest existing pattern. The disallowed tools are hardcoded (not configurable) because StrawPot should always prevent agents from using Claude Code's scheduler — there's no valid use case for allowing it.
Implementation Hints
- Files to modify:
claude_code/wrapper/main.go, claude_code/wrapper/main_test.go
- Patterns to follow: See
--dangerously-skip-permissions block at line ~241 of main.go and TestCmdBuild_DangerouslySkipPermissions_Default at line ~310 of main_test.go
- Key decisions: Hardcoded (not configurable via
--config JSON). Rationale: there is no scenario where StrawPot agents should use Claude Code's scheduler — StrawPot scheduling must always go through denden. If configurability is needed later, it's a trivial addition.
- Watch out for: The
--disallowedTools flag takes a comma-separated list as a single argument (not space-separated). Verify the exact flag name is --disallowedTools (camelCase, not kebab-case).
Acceptance Criteria
Context
Part of the implementation plan for #20.
Order: 1 of 1
StrawPot agents are using Claude Code's built-in scheduling tools (
CronCreate,CronDelete,CronList) instead of StrawPot's orchestrator-managed scheduling via denden. This creates "ghost schedules" invisible to the orchestrator. The fix is to pass--disallowedToolswhen building the claude CLI command.Task
Add a
--disallowedToolsflag to the command constructed incmdBuild()inclaude_code/wrapper/main.gothat blocks Claude Code's native scheduling tools.Specifically:
main.go→cmdBuild(), after the--dangerously-skip-permissionsblock (line ~243) and before the--add-dirblock (line ~247), add:main_test.go, add a testTestCmdBuild_DisallowedSchedulingToolsthat:captureBuildOutputwith minimal args (--agent-workspace-dironly)cmdarray contains--disallowedToolsfollowed byCronCreate,CronDelete,CronListusingassertSequencePattern to follow: The
--dangerously-skip-permissionsimplementation and its test (TestCmdBuild_DangerouslySkipPermissions_Default) are the closest existing pattern. The disallowed tools are hardcoded (not configurable) because StrawPot should always prevent agents from using Claude Code's scheduler — there's no valid use case for allowing it.Implementation Hints
claude_code/wrapper/main.go,claude_code/wrapper/main_test.go--dangerously-skip-permissionsblock at line ~241 ofmain.goandTestCmdBuild_DangerouslySkipPermissions_Defaultat line ~310 ofmain_test.go--configJSON). Rationale: there is no scenario where StrawPot agents should use Claude Code's scheduler — StrawPot scheduling must always go through denden. If configurability is needed later, it's a trivial addition.--disallowedToolsflag takes a comma-separated list as a single argument (not space-separated). Verify the exact flag name is--disallowedTools(camelCase, not kebab-case).Acceptance Criteria
cmdBuild()appends--disallowedTools CronCreate,CronDelete,CronListto the commandTestCmdBuild_DisallowedSchedulingToolsverifies the flag and value are presentcd claude_code/wrapper && go test ./...)