From 75cff300b4376b4ba7fe35accb1048c4cfc62017 Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:43:49 -0700 Subject: [PATCH] docs: sync README with source of truth (#2932) Co-authored-by: spawn-qa-bot Co-authored-by: L <6723574+louisgv@users.noreply.github.com> --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 2bbc2d2c..0cdf08fd 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,20 @@ If spawn fails to install, try these steps: spawn openclaw digitalocean ``` +### Headless JSON mode — agent exits immediately + +When using `--headless --output json` with Claude Code, you must also pass `--prompt` (or `-p`). Without it, Claude exits with `Input must be provided through stdin or --prompt` and the JSON output will show `"status":"error"`: + +```bash +# WRONG — Claude exits immediately +spawn claude gcp --headless --output json + +# RIGHT — provide a prompt +spawn claude gcp --headless --output json --prompt "Fix all linter errors" +``` + +Note: auto-update messages may appear before the JSON on older CLI versions. Run `spawn update` to get the fix. + ### Agent launch failures If an agent fails to install or launch on a cloud: