fix(adapters): Kimi Code and Junie dropped MultiEdit/NotebookEdit content - #36
Merged
jothimani-rajendran merged 1 commit intoAug 27, 2026
Merged
Conversation
…tent Both docstrings claim Claude Code's wire protocol exactly (Kimi: 'same snake_case fields, same tool_input'; Junie: 'field names follow Claude Code's wire protocol'), so this mirrors claude_code.parse's fallback chain rather than guessing at an unrecorded shape. parse() in each read only tool_input.content/new_string, so a MultiEdit writing a secret via edits[].new_string, or a NotebookEdit writing one via new_source, reached a content-scanning policy with Event.content = None -- the secret-scan deny never fired, on the one write path each adapter explicitly claims to support. Reproduced first (both content and path came back None for both tools on both adapters), then added the same content = content or new_string or new_source or joined(edits) chain, plus a notebook_path path fallback, that claude_code.parse already uses. Regression tests added for both adapters. Signed-off-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Both Kimi Code's and Junie's docstrings claim Claude Code's wire protocol exactly:
tool_input"But
parse()in each read onlytool_input.content/new_string-- so MultiEdit'sedits[].new_stringand NotebookEdit'snew_sourcewere dropped, exactly the class of bugclaude_code.pywas fixed for in #35.A content-scanning deny policy that already works on
claude_code's MultiEdit/NotebookEdit went silently blind on these two agents -- on the one write path each adapter's own docstring claims to support.Claim check
Nonefor MultiEdit/NotebookEdit on both adapters before the fix, confirmed non-Noneafter.claude_code.parse's existing fallback chain (content or new_string or new_source or joined(edits)), not a new pattern.Checks
pytest -q-- 754 passed, 1 skipped (up 2)ruffclean; stdlib-only; signed offNotes for the reviewer
Second item off
plan/vendor-truth-review-backlog.md's "distinct danger items" list (itemskimi_code.py:~100andjunie.py:~80), bothdropped-field / high|medium / likely, confirmed by execution first per the backlog's own stale-finding caveat.Generated by Claude Code