-
Notifications
You must be signed in to change notification settings - Fork 0
1/1: Add --disallowedTools to block Claude Code scheduling tools in cmdBuild() #22
Description
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-permissionsblock (line ~243) and before the--add-dirblock (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 testTestCmdBuild_DisallowedSchedulingToolsthat:- Calls
captureBuildOutputwith minimal args (--agent-workspace-dironly) - Parses the JSON output
- Asserts the
cmdarray contains--disallowedToolsfollowed byCronCreate,CronDelete,CronListusingassertSequence
- Calls
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-permissionsblock at line ~241 ofmain.goandTestCmdBuild_DangerouslySkipPermissions_Defaultat line ~310 ofmain_test.go - Key decisions: Hardcoded (not configurable via
--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. - Watch out for: The
--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 command - New test
TestCmdBuild_DisallowedSchedulingToolsverifies the flag and value are present - All existing tests pass (
cd claude_code/wrapper && go test ./...) - No regressions — existing command flags are unchanged