[pull] main from danny-avila:main#115
Merged
Merged
Conversation
* feat(coding-tools)!: rename read/write/edit `file_path` param to `path`
Models intermittently emit the very common `path` instead of `file_path` for
read_file/write_file/edit_file, which fails Zod validation ("Received tool input
did not match expected schema") and derails the agent run — the model then retries
or returns empty. Observed reliably with Kimi K2 via Fireworks/ClickHouse Inference
(the investigator dies right after the first tool call).
Rather than coerce the alias at every execution path, align the schema with what
models actually emit — and with the sibling search tools (grep_search /
glob_search / list_directory), which already use `path`. Now every built-in coding
tool takes its file/dir target in `path`.
- ReadFileToolSchema + Local{Read,Write,Edit}FileToolSchema: `file_path` -> `path`
- handlers read `input.path`
- workspace-policy extractors collapse to a single `path` extractor for all tools
- tests updated
BREAKING CHANGE: the read_file/write_file/edit_file parameter is now `path`
(was `file_path`). Consumers that construct or read these tool-call args must update.
Verified end-to-end against ClickHouse Inference (kimi-k2p7-code): a real investigator
loop goes 4/10 -> 10/10 with no coercion. Tool + hook suites green (the one failing
suite, directToolHITLResumeScope, fails identically on clean main — pre-existing).
* fix(cloudflare-ptc): rename generated read/write/edit helpers to `path`
Codex (#250): the Cloudflare Sandbox programmatic runners generate in-sandbox
read_file/write_file/edit_file helpers that still took `file_path` (Python defs +
the JS `payload.file_path` reads), so `write_file(path=...)` failed only in the
Cloudflare programmatic path after the schema switched to `path`. Rename the tool
wrappers' param to `path` (the internal `_resolve`/`_is_within_workspace` utils and
the code-execution temp-file locals keep `file_path` — unrelated).
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )