Skip to content

Handle live stream quota errors - #4

Merged
codemountains merged 1 commit into
mainfrom
agent/handle-stream-quota-errors
Aug 7, 2026
Merged

Handle live stream quota errors#4
codemountains merged 1 commit into
mainfrom
agent/handle-stream-quota-errors

Conversation

@codemountains

@codemountains codemountains commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • recognize the private live-stream concurrency and daily-quota API errors
  • keep rejected stream output off JSONL stdout while adding actionable stderr guidance
  • display the daily quota UTC reset message and numeric Retry-After delay
  • document admission rejection and reconnect termination behavior

Why

The backend now enforces free-service live-stream cost controls. The CLI
previously surfaced only the backend message and did not recognize the new
error codes or preserve the Retry-After response header for presentation.

User and developer impact

Concurrency rejection now advises users to close another live stream. Daily
quota rejection shows both the backend-provided UTC reset time and the retry
delay. Initial 429 admission failures leave stdout empty and exit non-zero
without reconnecting. If a clean EOF is followed by a quota 429, the CLI stops
after that reconnect response instead of entering another reconnect cycle.

Validation

  • TDD red: 3 focused stream-quota tests failed before implementation
  • focused test: 1 file / 12 tests passed
  • just check: 29 files / 230 tests passed, with typecheck and lint
  • just package: npm package smoke test passed
  • just ci: 29 files / 230 tests passed with coverage and repository checks
  • git diff --check

Related issues

@codemountains
codemountains marked this pull request as ready for review August 7, 2026 12:28
@codemountains
codemountains merged commit 0b1b66c into main Aug 7, 2026
5 checks passed
@codemountains
codemountains deleted the agent/handle-stream-quota-errors branch August 7, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Handle live stream concurrency and daily quota errors

1 participant