agent-orchestrator/packages/plugins/agent-codex/src
suraj-markup 2dfbf8a778 fix(agent-codex): fix token double-counting and spawn error handling
- Remove additive cached_tokens/reasoning_tokens from cost calculation
  (they are subsets of input_tokens/output_tokens per OpenAI API convention)
- Wrap entire connect() body in try/catch so connecting flag resets if
  spawn() throws synchronously (EMFILE, ENOMEM)
- Add test for spawn-throws-synchronously recovery
- Update cost assertions to reflect correct non-additive token counting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:19:36 +05:30
..
app-server-client.test.ts fix(agent-codex): fix token double-counting and spawn error handling 2026-02-25 01:19:36 +05:30
app-server-client.ts fix(agent-codex): fix token double-counting and spawn error handling 2026-02-25 01:19:36 +05:30
index.test.ts fix(agent-codex): fix token double-counting and spawn error handling 2026-02-25 01:19:36 +05:30
index.ts fix(agent-codex): fix token double-counting and spawn error handling 2026-02-25 01:19:36 +05:30