We want to better uncover error status code for clients. Add an optional
status_code to error events (thread error, error, stream error) so app
server could uncover the status code from the client side later.
in event log:
```
< {
< "method": "codex/event/stream_error",
< "params": {
< "conversationId": "019a9a32-f576-7292-9711-8e57e8063536",
< "id": "0",
< "msg": {
< "message": "Reconnecting... 5/5",
< "status_code": 401,
< "type": "stream_error"
< }
< }
< }
< {
< "method": "codex/event/error",
< "params": {
< "conversationId": "019a9a32-f576-7292-9711-8e57e8063536",
< "id": "0",
< "msg": {
< "message": "exceeded retry limit, last status: 401 Unauthorized, request id: 9a0cb03a485067f7-SJC",
< "status_code": 401,
< "type": "error"
< }
< }
< }
```
|
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
codex-protocol
This crate defines the "types" for the protocol used by Codex CLI, which includes both "internal types" for communication between codex-core and codex-tui, as well as "external types" used with codex app-server.
This crate should have minimal dependencies.
Ideally, we should avoid "material business logic" in this crate, as we can always introduce Ext-style traits to add functionality to types in other crates.