Skip to content

1/1: Add --disallowedTools to block Claude Code scheduling tools in cmdBuild() #22

Closed

Description

@juhgiyo

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:

  1. 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")
  1. 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

  • cmdBuild() appends --disallowedTools CronCreate,CronDelete,CronList to the command
  • New test TestCmdBuild_DisallowedSchedulingTools verifies the flag and value are present
  • All existing tests pass (cd claude_code/wrapper && go test ./...)
  • No regressions — existing command flags are unchanged

Activity

  1. added a commit that references this issue on Mar 21, 2026
    4ca9bd0
  2. juhgiyo commented on Mar 21, 2026

    @juhgiyo
    ContributorAuthor

    PR: #23
    All acceptance criteria met — flag appended, test added, all 15 tests pass.

  3. added a commit that references this issue on Mar 21, 2026
    c7a55b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions