Skip to content

fix(adapters): Kimi Code and Junie dropped MultiEdit/NotebookEdit content - #36

Merged
jothimani-rajendran merged 1 commit into
mainfrom
claude/kimi-junie-dropped-write-content
Aug 27, 2026
Merged

jothimani-rajendran merged 1 commit into
mainfrom
claude/kimi-junie-dropped-write-content

Conversation

@jothimani-rajendran

Copy link
Copy Markdown
Collaborator

What this changes

Both Kimi Code's and Junie's docstrings claim Claude Code's wire protocol exactly:

  • Kimi: "same PascalCase event names, same snake_case fields, same tool_input"
  • Junie: "Junie states outright that its field names follow Claude Code's wire protocol so a script can be shared between the two"

But parse() in each read only tool_input.content/new_string -- so MultiEdit's edits[].new_string and NotebookEdit's new_source were dropped, exactly the class of bug claude_code.py was fixed for in #35.

MultiEdit {edits: [{new_string: "AWS_SECRET=akia"}]}  →  event.content = None   (before)
NotebookEdit {new_source: "SECRET=akia"}              →  event.content = None   (before)

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

  • No capability claim widened -- both docstrings already claim Claude Code's exact field vocabulary; this makes the claim true rather than guessing at an unrecorded shape.
  • Verified by execution: reproduced both content and path returning None for MultiEdit/NotebookEdit on both adapters before the fix, confirmed non-None after.
  • Mirrors 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)
  • ruff clean; stdlib-only; signed off

Notes for the reviewer

Second item off plan/vendor-truth-review-backlog.md's "distinct danger items" list (items kimi_code.py:~100 and junie.py:~80), both dropped-field / high|medium / likely, confirmed by execution first per the backlog's own stale-finding caveat.


Generated by Claude Code

…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>
@jothimani-rajendran
jothimani-rajendran merged commit eda5ec3 into main Aug 27, 2026
12 checks passed
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