martin_run
Run a coding task under governance with hard budget caps, verification gates, and automatic rollback to stop runaway loops, bad code, and token waste.
Instructions
Execute a governed MartinLoop coding run after MCP workflow admission is satisfied. Use when the user has authorized implementation, bug fixing, tests, or refactoring and doctor/estimate/plan/preflight receipts match this task. Do not use for question-only diagnosis or when policy, budget, credentials, or scope still need consent. Next: read martin_dossier and verifier evidence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model override passed to the CLI. | |
| engine | No | Which agent CLI to use. Defaults to claude. | |
| maxUsd | No | Hard budget ceiling in USD. | |
| maxTokens | No | Maximum total tokens across all attempts. | |
| objective | Yes | The coding task to complete. Be specific about what needs to change. | |
| projectId | No | Project identifier for telemetry. | |
| deniedPaths | No | Repo-relative path globs Martin must never modify. | |
| workspaceId | No | Workspace identifier for telemetry. | |
| allowedPaths | No | Repo-relative path globs Martin may modify. | |
| maxIterations | No | Maximum number of loop attempts. | |
| verifyTimeoutMs | No | Hard timeout for each verifier command in milliseconds. | |
| verificationPlan | No | Commands that must all exit 0 for the task to be considered complete. | |
| workingDirectory | No | Optional repo-root override resolved under the MCP workspace root. Must stay within that safe root. | |
| providerExecutionTimeoutMs | No | Hard timeout for each provider coding process in milliseconds. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget | Yes | ||
| engine | Yes | ||
| loopId | Yes | ||
| reason | Yes | ||
| status | Yes | ||
| costUsd | Yes | ||
| attempts | Yes | ||
| pressure | Yes | ||
| inspection | Yes | ||
| shouldStop | Yes | ||
| lifecycleState | Yes | ||
| remainingTokens | No | ||
| workingDirectory | Yes | ||
| remainingBudgetUsd | Yes | ||
| verificationPassed | Yes | ||
| remainingIterations | Yes |