Skip to content

fix(errors): distinguish process termination from billing errors#22502

Closed
Shuai-DaiDai wants to merge 1 commit into
openclaw:mainfrom
Shuai-DaiDai:fix-11722-sigpipe-error-message
Closed

fix(errors): distinguish process termination from billing errors#22502
Shuai-DaiDai wants to merge 1 commit into
openclaw:mainfrom
Shuai-DaiDai:fix-11722-sigpipe-error-message

Conversation

@Shuai-DaiDai

@Shuai-DaiDai Shuai-DaiDai commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

Fixes #11722

When local exec commands are terminated by SIGPIPE (exit code 141) or SIGKILL (exit code 137), they were incorrectly reported as "API billing errors".

Changes

  • Added isProcessTerminationError() function to detect SIGPIPE/SIGKILL signals
  • Modified isBillingErrorMessage() to exclude process termination errors
  • Users now see appropriate error messages instead of misleading billing warnings

Testing

  1. Run a command that triggers SIGPIPE: curl -I https://example.com 2>&1 | head -n 5
  2. Verify the error message mentions process termination, not billing

Feedback welcome!

Greptile Summary

Added isProcessTerminationError() function to detect SIGPIPE (exit code 141/signal 13) and SIGKILL (exit code 137/signal 9) errors, and modified isBillingErrorMessage() to exclude these process termination errors, preventing them from being incorrectly reported as API billing errors.

Confidence Score: 4/5

  • This PR is safe to merge with low risk
  • The implementation correctly identifies process termination signals and prevents false positives in billing error detection. The logic is sound, covers all relevant signal codes (both numeric and name-based), and the change is narrowly scoped to fix a specific issue.
  • Consider adding unit tests for isProcessTerminationError() to verify all signal detection patterns work correctly

Last reviewed commit: 7e90325

)

When local exec commands are terminated by SIGPIPE (exit 141) or
SIGKILL (exit 137), they were incorrectly reported as billing errors.

This fix adds isProcessTerminationError() to detect these signals
and excludes them from billing error classification.

Fixes #11722
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Feb 21, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Feb 28, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #pr-thunderdome-dangerzone on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading error normalization: SIGPIPE/SIGKILL exec failures reported as “API billing error”

1 participant