Commit Graph
3 Commits
Author SHA1 Message Date
Alex Chang cc7a62e19c Report API spend limit errors by scope (#62329)
## Why

Generic quota errors hide whether the project or organization spend limit
blocked a request. Reporting the scope tells users which limit to check.

## What changed

Recognize API key, project, and organization spend limit errors across
HTTP, SSE, and WebSocket responses. Show a message that names the scope and
treat the error as non-retryable, even when the provider sends
`Retry-After`. Apply the existing usage-limit handling to goals and
compaction.

Expose distinct `CodexErrorInfo` values in the app-server protocol and
generated bindings so clients can identify the limit in live errors and
failed turn history.

## Testing

Extend the transport tests to cover all three scopes and verify that they
stop retries. Extend the app-server test to check that the error survives
`thread/read` and that a subsequent turn can succeed in the same thread.

GitOrigin-RevId: 03341f7a78daa7540e7baa519f1a29ec07e34509
2026-11-18 18:11:54 +00:00
Owen Lin 9f80bb5957 Expose bioPolicy errors in app-server v2 (#62176)
## Why

App-server clients received the generic `other` error code for biology
policy errors, so they couldn't distinguish them by code.

## What changed

Map the core `BioPolicy` error to `bioPolicy` in app-server v2 and include
the new value in the generated JSON schemas, TypeScript types, and Python
SDK enum.

## Testing

Update the error conversion test to assert that `BioPolicy` serializes as
`"bioPolicy"`.

GitOrigin-RevId: 77fa969a3d8cbd4c12fe6f7aa5d4833f6adaa99b
2026-11-18 03:37:23 +00:00
matthewdavis-oai 3bf4e138fe Stream partial thread search results and support cancellation (#62132)
## Why

Clients using `thread/search` have to wait for the search to finish before
they can show any matches. A search can also outlive the query that triggered
it, such as when a user changes their task mention query.

## What changed

- Add experimental `thread/search/stream` with best-effort
  `thread/search/partial` notifications. Each notification carries the original
  `requestId` and a batch of verified matches. Clients replace provisional
  matches with the final page, which determines results, ordering, and cursors.
- Support connection-scoped cancellation through `thread/search/stream/cancel`
  and `thread/search/cancel` for their respective search methods. Disconnecting
  also stops active searches and reaps their search subprocesses.
- Cancel superseded or timed-out TUI task mention searches without delaying
  available title matches.

## Testing

Add coverage for incremental results and final-page parity, slow clients,
connection-scoped cancellation and subprocess cleanup, and TUI task search
cancellation.

GitOrigin-RevId: b58abf7a1df424f191c8ede806d1d5266d299548
2026-11-17 23:46:48 +00:00