Skip to content

Commit 976d0f5

Browse files
Kasper JungeRalphify
authored andcommitted
docs: improve troubleshooting SEO metadata and fix broken links to deleted writing-prompts page
Co-authored-by: Ralphify <noreply@ralphify.co>
1 parent faab5c7 commit 976d0f5

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

docs/troubleshooting.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Troubleshooting Ralph Loops
3-
description: Fix common ralphify issues — setup errors, agent hangs, command failures, and permission issues.
4-
keywords: ralphify troubleshooting, agent hangs, command failures, setup errors, debug ralph loop
2+
title: "Fix Agent Hangs, Command Failures, and RALPH.md Errors — Ralphify Troubleshooting"
3+
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
55
---
66

77
# Troubleshooting
@@ -35,7 +35,7 @@ ls .agents/ralphs/my-ralph/RALPH.md # installed ralph
3535

3636
### "Missing or empty 'agent' field in RALPH.md frontmatter"
3737

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:
3939

4040
```markdown
4141
---
@@ -107,8 +107,8 @@ cat ralph_logs/001_*.log
107107

108108
Common causes:
109109

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
112112
- The agent can't find what it's supposed to work on
113113

114114
## Frontmatter issues
@@ -208,7 +208,7 @@ credit: true
208208

209209
### "Command name contains invalid characters" / "Arg name contains invalid characters"
210210

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).
212212

213213
```yaml
214214
# ✗ Wrong — dots and spaces aren't allowed
@@ -377,7 +377,7 @@ commands:
377377
378378
### Command with pipes or redirections not working
379379
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.
381381

382382
**Won't work:**
383383

@@ -421,7 +421,7 @@ Note that command output is included in the prompt **regardless of exit code**.
421421

422422
### Command output looks truncated
423423

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:
425425

426426
```text
427427
[Command 'tests' timed out after 60s — output may be incomplete]
@@ -547,7 +547,7 @@ ralph run my-ralph --dir ./api --focus "error handling"
547547
ralph run my-ralph --dir ./frontend --focus "accessibility"
548548
```
549549

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.
551551

552552
## Getting more help
553553

@@ -559,5 +559,4 @@ See [Parameterized ralphs](writing-prompts.md#parameterized-ralphs) for more pat
559559
## Next steps
560560

561561
- [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
563562
- [Cookbook](cookbook.md) — working examples you can adapt for your project

0 commit comments

Comments
 (0)