Skip to content

Fix Codex provider to detect file edits from patch_apply_end events#148

Merged
iamtoruk merged 1 commit intomainfrom
fix/codex-patch-edit-detection
Apr 24, 2026
Merged

Fix Codex provider to detect file edits from patch_apply_end events#148
iamtoruk merged 1 commit intomainfrom
fix/codex-patch-edit-detection

Conversation

@iamtoruk
Copy link
Copy Markdown
Member

@iamtoruk iamtoruk commented Apr 24, 2026

Summary

  • Fix Codex edit detection showing 0 edit turns despite actual file changes
  • Detect patch_apply_end events as Edit tool usage
  • Enables proper calculation of one-shot rates, retry rates for Codex sessions

Problem

Codex records file modifications as event_msg entries with type: patch_apply_end rather than function_call tool invocations like write_file. The provider was only looking for tool calls, missing all the actual edits.

Solution

Track patch_apply_end events and add "Edit" to the tools list when detected.

Test plan

  • Verified locally: Codex now shows Edit: 29 calls
  • Coding 1-shot rate now shows 100% instead of "-"
  • Run codeburn compare with Codex model to verify metrics

Codex records file modifications as event_msg entries with type
patch_apply_end rather than function_call tool invocations. This fix
tracks those events and adds Edit to the tools list, enabling proper
calculation of edit turns, one-shot rates, and retry rates.

Fixes edit detection showing 0 edit turns despite actual file changes.
@iamtoruk iamtoruk merged commit 1702243 into main Apr 24, 2026
3 checks passed
@iamtoruk iamtoruk deleted the fix/codex-patch-edit-detection branch April 24, 2026 18:09
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.

1 participant