Commit 2843258
authored
fix(billing): carry the codex denial message across the ACP boundary
A plain Error serializes to a bare -32603 "Internal error" at the ACP
boundary, so the gateway text never reached the host's classifier — the
denial read as a fatal session error and triggered a kill/respawn/resend
loop instead of the upgrade modal. Reject with
RequestError.internalError(undefined, message) like the Claude adapter,
which lands client-side as "Internal error: …needs a paid PostHog plan…"
and classifies correctly. The test now asserts the RequestError shape, not
just the in-process rejection.
Generated-By: PostHog Code
Task-Id: 1039ea23-9930-44e2-9888-b05cf8b129ec1 parent 0649175 commit 2843258
2 files changed
Lines changed: 20 additions & 3 deletions
File tree
- packages/agent/src/adapters/codex-app-server
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
1619 | 1620 | | |
1620 | 1621 | | |
1621 | 1622 | | |
1622 | | - | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
1623 | 1637 | | |
1624 | 1638 | | |
1625 | 1639 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
1259 | 1260 | | |
1260 | 1261 | | |
1261 | 1262 | | |
1262 | | - | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1263 | 1266 | | |
1264 | 1267 | | |
1265 | 1268 | | |
1266 | 1269 | | |
1267 | 1270 | | |
1268 | | - | |
| 1271 | + | |
1269 | 1272 | | |
1270 | 1273 | | |
1271 | 1274 | | |
| |||
0 commit comments