You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Solve common ralphify issues: agent hangs or produces no output, RALPH.md frontmatter syntax errors, commands with pipes not working, missing placeholders, argument parsing failures, and iteration timeouts."
4
+
keywords: ralphify troubleshooting, fix agent hang, agent produces no output, RALPH.md frontmatter error, invalid YAML frontmatter, command timeout ralphify, command pipes not working shlex, ralph run error, agent command not found, debug ralph loop, fix autonomous coding agent, placeholder not resolving, ralph argument parsing
5
5
---
6
6
7
7
# Troubleshooting
@@ -35,7 +35,7 @@ ls .agents/ralphs/my-ralph/RALPH.md # installed ralph
35
35
36
36
### "Missing or empty 'agent' field in RALPH.md frontmatter"
37
37
38
-
Your `RALPH.md`[frontmatter](writing-prompts.md#the-anatomy-of-a-good-ralphmd) is missing the `agent` field or it's an empty string. Add it:
38
+
Your `RALPH.md` frontmatter is missing the `agent` field or it's an empty string. Add it:
39
39
40
40
```markdown
41
41
---
@@ -107,8 +107,8 @@ cat ralph_logs/001_*.log
107
107
108
108
Common causes:
109
109
110
-
- The prompt is too vague — see [anti-patterns that waste iterations](writing-prompts.md#anti-patterns-that-waste-iterations)
111
-
- There's no concrete task source (no TODO.md, PLAN.md, or failing tests to fix) — see [the TODO-driven loop](writing-prompts.md#the-todo-driven-loop)
110
+
- The prompt is too vague — tell the agent it's in a loop with no memory between iterations, and give it a specific task
111
+
- There's no concrete task source — point the prompt at something like `TODO.md`, `PLAN.md`, or failing tests
112
112
- The agent can't find what it's supposed to work on
113
113
114
114
## Frontmatter issues
@@ -208,7 +208,7 @@ credit: true
208
208
209
209
### "Command name contains invalid characters" / "Arg name contains invalid characters"
210
210
211
-
Command names and arg names may only contain letters, digits, hyphens, and underscores (`a-z`, `A-Z`, `0-9`, `-`, `_`). Names with dots, spaces, or special characters are rejected because they can't be used in [`{{ commands.<name> }}` or `{{ args.<name> }}` placeholders](writing-prompts.md#ralph-context-placeholders).
211
+
Command names and arg names may only contain letters, digits, hyphens, and underscores (`a-z`, `A-Z`, `0-9`, `-`, `_`). Names with dots, spaces, or special characters are rejected because they can't be used in [`{{ commands.<name> }}` or `{{ args.<name> }}` placeholders](how-it-works.md#3-resolve-placeholders-with-command-output).
212
212
213
213
```yaml
214
214
# ✗ Wrong — dots and spaces aren't allowed
@@ -377,7 +377,7 @@ commands:
377
377
378
378
### Command with pipes or redirections not working
379
379
380
-
Commands in the `run` field are parsed with `shlex` and run **directly** — not through a shell. Shell features like pipes (`|`), redirections (`2>&1`), chaining (`&&`), and variable expansion (`$VAR`) silently fail or produce unexpected results. See [shell features in commands](writing-prompts.md#shell-features-in-commands) for background.
380
+
Commands in the `run` field are parsed with `shlex` and run **directly** — not through a shell. Shell features like pipes (`|`), redirections (`2>&1`), chaining (`&&`), and variable expansion (`$VAR`) silently fail or produce unexpected results. The escape hatch is a script — wrap the shell features inside a `.sh` file and point the command at it.
381
381
382
382
**Won't work:**
383
383
@@ -421,7 +421,7 @@ Note that command output is included in the prompt **regardless of exit code**.
421
421
422
422
### Command output looks truncated
423
423
424
-
Each command has a default timeout of **60 seconds** (see [command timeouts](writing-prompts.md#command-timeouts)). If your command takes longer (a large test suite, a slow build), it's killed at the timeout and only the output captured so far is used. The agent sees a notice appended to the output:
424
+
Each command has a default timeout of **60 seconds** (see [Run commands and capture output](how-it-works.md#2-run-commands-and-capture-output)). If your command takes longer (a large test suite, a slow build), it's killed at the timeout and only the output captured so far is used. The agent sees a notice appended to the output:
425
425
426
426
```text
427
427
[Command 'tests' timed out after 60s — output may be incomplete]
@@ -547,7 +547,7 @@ ralph run my-ralph --dir ./api --focus "error handling"
547
547
ralph run my-ralph --dir ./frontend --focus "accessibility"
548
548
```
549
549
550
-
See [Parameterized ralphs](writing-prompts.md#parameterized-ralphs) for more patterns.
550
+
See [User arguments](cli.md#user-arguments) for more on parameterizing ralphs.
551
551
552
552
## Getting more help
553
553
@@ -559,5 +559,4 @@ See [Parameterized ralphs](writing-prompts.md#parameterized-ralphs) for more pat
559
559
## Next steps
560
560
561
561
- [How it works](how-it-works.md) — understand the iteration lifecycle to debug more effectively
562
-
- [Writing prompts](writing-prompts.md) — improve your RALPH.md to avoid common loop issues
563
562
- [Cookbook](cookbook.md) — working examples you can adapt for your project
0 commit comments