Skip to main content
Glama

claude_execute_start

Starts an approved plan as an async Claude CLI job, returning a job_id immediately so long runs avoid the 180s MCP timeout. Poll with claude_execute_status or cancel any time.

Instructions

Start a long-running approved plan asynchronously via local Claude Code CLI (Sonnet 5.5) with local continuity cache (.agents/state/plan-history.md and session-index.json) and immediately return a job_id without hitting the 180s MCP timeout. Poll completion with claude_execute_status or stop it with claude_execute_cancel.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace_dir": "<workspace_dir>"
    },
    "name": "claude_execute_start"
  }
}

Input Schema

NameRequiredDescriptionDefault
planNoComplete approved implementation plan or fix-round instructions (optional when plan_file is provided).
modelNoClaude model alias or ID (default: sonnet -> Sonnet 5.5; e.g. claude-sonnet-5-5, sonnet[1m]).
effortNoClaude CLI reasoning effort: low, medium, high, xhigh, or max (default: CLAUDE_EFFORT or high).
max_turnsNoMaximum Claude CLI agentic turns (default: 40).
plan_fileNoPath to the approved plan file (relative to workspace_dir or absolute). It identifies the plan content but does NOT change the warm session.
session_keyNoContinuity bucket in .agents/state/session-index.json (default: 'workspace'), so sequential small updates and new plan files stay on one warm session. Pass a custom key only for unrelated subsystems.
session_modeNo'auto' (default): resume the warm workspace session within TTL 3600s / 30 turns and inject a compact External Workspace Changes diff when files were edited outside the session, rotate otherwise; 'resume' to force resuming; 'fresh' to force a new session.
allowed_filesNoAuthorized file paths Claude is permitted to create or modify.
extra_contextNoOptional supplementary context or constraints for the execution.
workspace_dirYesAbsolute path to the target project workspace directory.
include_historyNoInject bounded L1 .agents/state/workspace-brief.md plus the latest 2 L2 plan-history entries on fresh/rotated/fallback runs (default: true).
permission_modeNoClaude CLI permission mode (default: bypassPermissions).
timeout_secondsNoAsync background timeout in seconds (default: 900, max: 1800).
resume_session_idNoExplicit Claude CLI session_id to resume directly via --resume.
verification_commandsNoCommands Claude must execute to collect objective runtime evidence.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the async job_id contract, the timeout-avoidance rationale, the continuity cache files, and the 3600s/30-turn warm-session window with rotation and External Workspace Changes diff injection. Gaps remain around the consequences of the default bypassPermissions mode and failure/recovery semantics after a job starts.

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

Conciseness4/5

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

Front-loaded with the verb and the async rationale, then a second sentence that routes to the follow-up tools. The middle clause listing cache file paths is dense but informative; little is wasted.

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?

For a 15-parameter, no-annotation, no-output-schema tool, the description supplies the missing return contract (job_id) and the session-continuity model an agent needs to call it correctly. Remaining gaps are around error/failure behavior and permission-mode implications rather than core invocation.

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?

Schema coverage is 100%, so every one of the 15 parameters is already documented, including enums for effort, session_mode, and permission_mode. The description adds no parameter-level detail beyond restating the async return, so baseline 3 applies.

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?

Names a specific verb and resource — 'Start a long-running approved plan asynchronously via local Claude Code CLI' — and pins down the output ('immediately return a job_id'). It is clearly distinguishable from the sibling claude_execute (synchronous) and explicitly routes to claude_execute_status and claude_execute_cancel.

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?

Names the follow-up tools for the two branches (poll via claude_execute_status, stop via claude_execute_cancel) and frames the use case as work that would otherwise exceed the 180s MCP timeout. It stops short of saying when to prefer the synchronous sibling, but the timeout framing implies it.

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