Repository navigation
Description
Problem
squad watch --execute --agent-cmd is documented as a custom agent runner
override, but both watch command builders always append the Copilot-specific
-p <prompt> arguments.
That means a custom runner must imitate Copilot CLI's prompt contract. Runners
that use another prompt flag cannot be invoked directly. One motivating example
is Boundary, which accepts the task through --task; other task-oriented agent
CLIs have the same integration problem.
This also leaves a gap between:
- Add token usage tracking and cost visibility for agent sessions #453 / feat: add token usage tracking and cost visibility #454, which added token and cost visibility plus budget config; and
- Epic: Harden unattended watch execution boundaries #1477 / Spike: Verify sandbox and tool-governance coverage for unattended watch execution #1480, which call for enforceable unattended execution boundaries
without inventing a Squad-specific policy language.
Proposed behavior
Allow one standalone {prompt} argv token inside a custom agentCmd:
boundary run ... --task {prompt}
When present, Squad replaces that token with the complete generated prompt as
one argv element. When absent, Squad preserves the current behavior and appends
-p <prompt>.
This is a generic command-contract fix. It does not make alternate engines
feature-equivalent to the default Copilot path.
Acceptance criteria
-
agentCmdwith no{prompt}behaves exactly as it does today. - One standalone
{prompt}token is replaced with the complete prompt as
one argv element. - Embedded forms such as
--task={prompt}are not treated as placeholders. - More than one
{prompt}token fails before spawning with a clear error. - Both
buildAgentCommandandbuildCopilotCommanduse the same helper. - Existing Windows argument escaping remains in the spawn path.
- Unit tests cover legacy, placeholder, duplicate-placeholder, and full
multi-word prompt cases. - Watch documentation includes one generic external-runner example and
states that policy enforcement belongs to the runner.
Non-goals
- Adding Boundary as a Squad dependency.
- Implementing a second budget or sandbox policy engine in Squad.
- Claiming daily/weekly/monthly enforcement from a direct
boundary run;
Boundary currently exposes those windows through schedule/pipeline config. - Preserving the default Copilot MCP injection for an alternate agent engine.
- Treating an estimated-dollar cap as exact GitHub Copilot billing.
- Replacing Squad's existing model category policy or cost reporting.
References
- Add token usage tracking and cost visibility for agent sessions #453
- Epic: Harden unattended watch execution boundaries #1477
- Spike: Verify sandbox and tool-governance coverage for unattended watch execution #1480
packages/squad-cli/src/cli/commands/watch/agent-spawn.ts- https://github.com/mavaali/boundary#spend-control
Activity
bradygaster commentedon Aug 14, 2026
If the goal here is to support a non-Copilot SDK/LLM, we're not going to be adding support for that atm. There is no plan to extend Squad beyond Copilot at this time.
Support prompt placement in custom agent commands (github#1708)