Skip to content

Support stringified edit tool inputs - #27

Merged
currybab merged 2 commits into
mainfrom
fix/edit-tool-stringified-mode
May 5, 2026
Merged

currybab merged 2 commits into
mainfrom
fix/edit-tool-stringified-mode

Conversation

@currybab

@currybab currybab commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

Agent edit tool calls that double-encode mode or edits now deserialize successfully instead of failing before an edit session starts. This backports the relevant behavior from zed-industries/zed#55500 while keeping the change scoped to Superzent's streaming edit file tool.

  • Adds a local serde helper that accepts either native JSON values or JSON strings containing those values.
  • Applies the helper to final edit-tool input and streaming partial input for mode and edits.
  • Adds focused coverage for native values, double-encoded values, omitted optionals, and explicit null optionals.

Testing

  • cargo test -p agent deserializes --lib
  • cargo test -p agent test_streaming_edit_file_tool_fields_out_of_order_in_edit_mode --lib
  • ./script/clippy -p agent

Notes


Compound Engineering
GPT-5

Release Notes:

  • Fixed agent edit failures when edit-tool input fields are sent as stringified JSON.

@currybab
currybab merged commit c36aa66 into main May 5, 2026
10 checks passed
@currybab
currybab deleted the fix/edit-tool-stringified-mode branch May 5, 2026 04:30
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