Summary
When a local exec command is terminated (e.g., by SIGPIPE from | head, or by manually killing the exec session), OpenClaw sometimes emits a generic message:
⚠️ API provider returned a billing error — your API key has run out of credits or has an insufficient balance...
This is misleading: the underlying failure is a local process termination (SIGPIPE/exit 141 or SIGKILL), not an API billing/credit issue.
Why this matters
This message trains users to look at provider billing dashboards when the actual issue is just a shell pipeline / process termination. It also creates false incident noise for monitoring.
Reproduction (likely)
- Run a command that will be intentionally truncated, e.g.:
curl -I https://example.com 2>&1 | head -n 5
(This often causes SIGPIPE / exit code 141 in the upstream process.)
- Or start a long-running
grep -R ... and terminate the exec session.
- Observe OpenClaw producing the “API billing error” explanation.
Observed
- The underlying tool failure presented as SIGPIPE/SIGKILL (exit 141 / signal kill)
- Followed by the “API provider returned a billing error…” explanation in the chat surface
Expected
- If exit code indicates SIGPIPE (141) or SIGKILL, surface a message like:
- “Command terminated early (SIGPIPE) — likely due to piped truncation (e.g.,
| head).”
- “Command killed (SIGKILL) — likely manually terminated / OS kill.”
- Do not label as billing/credits unless the HTTP response or provider error explicitly indicates 402/insufficient balance.
Environment
- OpenClaw version: 2026.2.6-3
- Host: macOS (Mac mini)
Summary
When a local
execcommand is terminated (e.g., by SIGPIPE from| head, or by manually killing the exec session), OpenClaw sometimes emits a generic message:This is misleading: the underlying failure is a local process termination (SIGPIPE/exit 141 or SIGKILL), not an API billing/credit issue.
Why this matters
This message trains users to look at provider billing dashboards when the actual issue is just a shell pipeline / process termination. It also creates false incident noise for monitoring.
Reproduction (likely)
grep -R ...and terminate the exec session.Observed
Expected
| head).”Environment