Skip to main content
Glama

start_ralph_loop

Starts a worker that runs fresh Claude sessions per iteration, reloading state from filesystem to prevent context rot during long-running autonomous coding tasks.

Instructions

Start a worker using the Ralph Loop pattern. Each iteration gets a fresh Claude session with state loaded from filesystem (progress files, git diff). Eliminates context rot for long-running tasks.

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": {
      "projectDir": "<projectDir>",
      "featureId": "<featureId>"
    },
    "name": "start_ralph_loop"
  }
}

Input Schema

NameRequiredDescriptionDefault
featureIdYesFeature to work on
projectDirYesAbsolute path to the project directory
maxIterationsNoMaximum iterations (default: 50)
maxDurationMinutesNoMaximum duration in minutes (default: 480)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the iteration model (fresh session, filesystem state, git diff), which is genuinely useful, but omits critical traits for a long-running launcher: whether the call blocks or returns immediately, what handle/id is returned for monitoring, failure behavior mid-loop, cost/resource implications, and any permission requirements.

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?

Three short sentences, front-loaded with the action and followed by the mechanism and the benefit. No filler or repeated content, though the final benefit sentence is somewhat promotional rather than operational.

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

Completeness3/5

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

For a launcher that can run up to 200 iterations and 4 hours, the description explains the pattern but leaves the agent without the lifecycle picture: no return value, no indication of how to monitor progress or stop the loop, and no output schema to fall back on. Adequate to start, insufficient to use well afterward.

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 description coverage is 100%, including defaults, bounds, and path format for all four parameters, so the schema does the heavy lifting. The description adds no parameter-level meaning such as what featureId must reference or how projectDir interacts with progress files, so baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource ("Start a worker") and explains the distinctive mechanism: a fresh Claude session per iteration with state reloaded from the filesystem. It does not, however, distinguish this from close siblings like start_worker, start_continuous_worker, or start_parallel_workers, so an agent cannot tell purely from the text which starter to pick.

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

Usage Guidelines3/5

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

"Eliminates context rot for long-running tasks" implies the usage condition (long-running work) but states no explicit when-not, no prerequisites, and names no alternative tool. The agent must infer that this is the right starter for multi-iteration feature work rather than a single worker.

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