Skip to content

fix(codex): emit complete correlated tool results - #66

Draft
adityathebe wants to merge 1 commit into
mainfrom
fix/codex-complete-tool-results
Draft

fix(codex): emit complete correlated tool results#66
adityathebe wants to merge 1 commit into
mainfrom
fix/codex-complete-tool-results

Conversation

@adityathebe

Copy link
Copy Markdown
Member

Closes #12

Main already maps Codex command starts to EventToolUse, buffers output deltas, and emits a correlated EventToolResult on completion.

However, Codex 0.147 can omit the first output chunk from both its deltas and aggregatedOutput. This PR finishes the implementation by correlating the complete raw function_call_output with the command, while retaining the existing accumulated output as a fallback.

Tested with the provider test suite, race detector, and a live authenticated Codex run.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 211b456d-6eac-4bda-a416-f0727bb77d21

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Gavel summary

Source Pass Fail Skip Duration

Totals: 0 passed · 0 failed · 0 skipped · -

View full results

@github-actions

Copy link
Copy Markdown

Gavel summary

Source Pass Fail Skip Duration
ai 87 0 0 27ms
aichat 113 0 2 7.8s
anthropicmock 1 0 0 1ms
api 80 0 0 17ms
attachments 5 0 0 2ms
bash 4 0 0 172.204µs
callertools 10 0 0 80ms
captain 6 0 0 1ms
claude 22 0 0 11ms
claudeagent 13 0 0 253ms
cli 209 0 0 5.0s
cmux 4 0 0 1ms
collections 12 0 0 1ms
credentials 5 0 0 85ms
database 15 0 0 2.3s
genkit 25 0 0 40ms
gitagent 66 0 0 7.2s
github.com/flanksource/captain/migrations 11 0 0 3.6s
github.com/flanksource/captain/pkg/ai 232 0 0 540ms
github.com/flanksource/captain/pkg/ai/agent 23 0 0 -
github.com/flanksource/captain/pkg/ai/agent/commit 52 0 0 3.8s
github.com/flanksource/captain/pkg/ai/agent/setup 16 0 0 100ms
github.com/flanksource/captain/pkg/ai/agent/verify 21 0 0 420ms
github.com/flanksource/captain/pkg/ai/agent/worktree 6 0 0 -
github.com/flanksource/captain/pkg/ai/assistanttags 15 0 0 -
github.com/flanksource/captain/pkg/ai/fixture 42 0 0 310ms
github.com/flanksource/captain/pkg/ai/fixture/kubeproxy 2 0 0 100ms
github.com/flanksource/captain/pkg/ai/fixture/mcpproxy 6 0 0 -
github.com/flanksource/captain/pkg/ai/history 54 0 0 -
github.com/flanksource/captain/pkg/ai/internal/gen-model-registry 12 0 0 -
github.com/flanksource/captain/pkg/ai/middleware 25 0 0 -
github.com/flanksource/captain/pkg/ai/pricing 9 0 0 10ms
github.com/flanksource/captain/pkg/ai/prompt 16 0 0 20ms
github.com/flanksource/captain/pkg/ai/provider 144 0 0 10ms
github.com/flanksource/captain/pkg/ai/provider/claudeagent 44 0 0 1.2s
github.com/flanksource/captain/pkg/ai/provider/cmux 119 0 0 850ms
github.com/flanksource/captain/pkg/ai/provider/genkit 36 0 0 -
github.com/flanksource/captain/pkg/ai/provider/jsonrpc 6 0 0 50ms
github.com/flanksource/captain/pkg/aichat 5 0 0 100ms
github.com/flanksource/captain/pkg/aimock 50 0 7 290ms
github.com/flanksource/captain/pkg/aimock/anthropicmock 14 0 0 20ms
github.com/flanksource/captain/pkg/aimock/openaimock 18 0 0 50ms
github.com/flanksource/captain/pkg/api 136 0 0 270ms
github.com/flanksource/captain/pkg/api/registry 96 0 0 -
github.com/flanksource/captain/pkg/bash 348 0 0 -
github.com/flanksource/captain/pkg/captainconfig 25 0 0 -
github.com/flanksource/captain/pkg/claude 138 0 0 -
github.com/flanksource/captain/pkg/claude/tools 18 0 0 -
github.com/flanksource/captain/pkg/cli 532 0 0 32.8s
github.com/flanksource/captain/pkg/cmux 1 0 0 -
github.com/flanksource/captain/pkg/codexconfig 10 0 0 -
github.com/flanksource/captain/pkg/container 72 0 1 -
github.com/flanksource/captain/pkg/database 99 0 0 10.6s
github.com/flanksource/captain/pkg/dod 11 0 0 1m0s
github.com/flanksource/captain/pkg/gitagent 31 0 0 620ms
github.com/flanksource/captain/pkg/gitagent/proxy 12 0 0 10ms
github.com/flanksource/captain/pkg/monitor 54 0 0 1.6s
github.com/flanksource/captain/pkg/sandbox 1 0 0 -
github.com/flanksource/captain/pkg/sandbox/adapter 26 0 0 -
github.com/flanksource/captain/pkg/sandbox/presets 13 0 0 -
github.com/flanksource/captain/pkg/session 70 0 0 -
history 69 0 0 9ms
migrations 6 0 0 2.8s
openaimock 2 0 0 118.694µs
provider 12 0 0 14ms
registry 38 0 0 1ms
session 28 0 0 16ms
tools 38 0 0 1ms

Totals: 3541 passed · 0 failed · 10 skipped · 2m23s

View full results

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.

Restructure codex provider to emit tool call + EventToolResult on the live stream

2 participants