Skip to content

Preserve failed tool calls across adapters#12

Open
ShuzhaoFeng wants to merge 1 commit into
builderpepc:masterfrom
ShuzhaoFeng:codex-skip-failed-patches
Open

Preserve failed tool calls across adapters#12
ShuzhaoFeng wants to merge 1 commit into
builderpepc:masterfrom
ShuzhaoFeng:codex-skip-failed-patches

Conversation

@ShuzhaoFeng

Copy link
Copy Markdown

Agent tool calls sometimes fail. When they are failed, the tool result is not applied and the harness often have special visual cues for them.

Harnesses report their tool result in their conversation:

  • Codex: an explicit lifecycle event called patch_apply_end, which contains the success attribute.
  • Claude Code: tool_result.is_error
  • Cursor: toolFormerData.status == "error"
  • Gemini: to be investigated. Gemini CLI is being deprecated anyways. Currently failing back to an unknown state which preserves the original behavior.

This PR addresses the error handling, and make sure the right type of tool call result is migrated.

P.S. Thank you for building this. We were working on another project which requires handing different agent conversations, and as a result we've built our own specialized tool for parsing them. Would have saved a lot of time if agent-migrator were already there. If this goes well, we'll open more PRs to transfer our knowledge into this public repo.

@builderpepc

Copy link
Copy Markdown
Owner

Hey @ShuzhaoFeng! Thanks for your contribution and the note. I will test this when I get a chance and hopefully merge your changes soon.

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.

2 participants