Delegate test writing/running to a cheaper model
delegate_testsWrite and run tests for specified modules, files, or behaviors without modifying production code. Supports custom frameworks and run verification.
Instructions
Test-focused wrapper around delegate_task. The subagent writes (and optionally runs) tests for the given scope while avoiding changes to production code unless strictly required to make tests pass.
Args:
scope (string, required — alias:
task, accepted for parity with delegate_task; provide one): What to test — module, files, behaviors, edge cases.directory (string): Absolute repo path. Defaults to config.default_directory or server cwd.
framework (string): Optional testing framework/runner hint (e.g. "vitest", "pytest").
run_tests (boolean): Ask the subagent to run the suite and report pass/fail (default true).
model / agent / variant / profile / files / session / continue_session / auto_approve: same as delegate_task.
response_format ('markdown' | 'json'): Output format (default 'markdown').
See also: delegate_task — same shape, general-purpose; its required field is named task instead of scope.
Returns the same structured content shape as delegate_task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | Alias for `scope` (delegate_task uses this name) — provide one or the other | |
| agent | No | ||
| files | No | ||
| model | No | ||
| scope | No | What to test: module/files/behaviors/edge cases. Required unless `task` is given instead. | |
| profile | No | ||
| session | No | ||
| variant | No | ||
| directory | No | Absolute working directory | |
| framework | No | Testing framework/runner hint | |
| run_tests | No | Run the suite and report results | |
| auto_approve | No | ||
| response_format | No | markdown | |
| continue_session | No |