Skip to main content
Glama

run_task_loop

Start a guarded task loop that executes, verifies, and audits repository changes while enforcing scoped permissions and confirmation boundaries.

Instructions

Start a guarded PatchWarden task loop by composing create_task, wait_for_task, safe summaries, and audit_task. By default it returns request_id, lineage_id, and the created main task immediately while Core continues the loop in the background; follow with wait_for_task and get_task_lineage. It does not bypass the watcher, command allow-list, workspace confinement, or confirmation boundaries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesTask goal to execute through the guarded loop.
agentNoConfigured local agent name. No agents are currently configured.
templateNoInitial guarded task template. Follow-up repair tasks use fix_tests automatically when verification fails.feature_small
repo_pathYesRequired repository path inside workspaceRoot. No implicit workspace-root fallback is allowed.
request_idNoOptional idempotency key. Retrying the same arguments with the same request_id returns the existing lineage and never creates a duplicate task.
scope_filesNoOptional bounded file scope used only for agent routing hints.
direct_verifyNoWhen true, run an independent Direct verification session after the guarded task/audit succeeds. Direct never patches files in this loop.
auto_fix_testsNoWhen true, create a fix_tests follow-up task after failed_verification until max_iterations is reached.
isolation_modeNoUse current_repo by default. worktree creates an isolated git worktree for the task but never auto-merges it.current_repo
max_iterationsNoMaximum total main/fix task attempts.
requested_modelNoOptional model override. Requires an explicit non-auto agent and is retained for every task iteration.
verify_commandsYesExact-match verification commands. The loop reuses create_task validation and will not run commands outside the allow-list.
worktree_cleanupNoCleanup intent recorded in lineage. v1.5 keeps worktrees by default and does not auto-delete them.keep
stop_on_high_riskNoWhen true, stop immediately on non-policy high-risk audit evidence. Scope, policy, sensitive-path, release/publish, and confirmation boundaries always stop regardless of this flag.
wait_for_completionNoLocal/debug compatibility mode. When false (default), return after the main task is created. Set true only when the transport timeout is known to exceed the full loop duration.
task_timeout_secondsNoPer-task wait budget in seconds (default 900, max 3600).
worktree_base_branchNoOptional base-branch label recorded in lineage. v1.5 does not auto-checkout or merge this branch.
auto_cleanup_artifactsNoRecords cleanup intent in lineage. Low-risk cleanup remains handled by runTask post-task cleanup.
confirm_workspace_rootNoExplicit acknowledgement required when repo_path is a detected multi-project workspace root.
direct_verify_commandsNoOptional Direct verification commands. Defaults to verify_commands and still must pass the Direct command allow-list.
direct_verify_timeout_secondsNoPer-command timeout for Direct verification.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description details the composition of subtools, immediate return, background execution, and safety boundaries (watcher, allow-list, confinement, confirmation). With no annotations, this provides adequate transparency, though it could mention side effects like task creation explicitly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (3 sentences) and front-loaded with the main action, covering the essential flow and constraints without unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (21 parameters, orchestration of multiple subtools), the description provides sufficient high-level context. The schema handles parameter details, and the description clarifies the return values and follow-up steps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of parameters with descriptions, so the tool description adds minimal additional value. It does not elaborate on parameter usage beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool starts a guarded PatchWarden task loop by composing multiple subtools, distinguishing it from individual tools like create_task or wait_for_task.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the default behavior (returns immediately, loop continues in background) and advises subsequent calls (wait_for_task, get_task_lineage). However, it does not explicitly contrast with siblings or specify when to use this orchestrated loop versus individual steps.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jiezeng2004-design/PatchWarden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server