Repository navigation
Quote MCP paths that hold control characters - #40
Conversation
A newline in a file name split one path over two lines of list, glob, grep and changes output. Those paths are now shown as quoted JSON strings, which is also how the agent passes them back. Closes #31. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011Sm13qU55Kobe2fHFiLN22
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d411f7412d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Addresses the Codex review on #40: the trailing slash of a directory now sits inside the quotes, the 'nothing found' replies quote their path, and controls outside ASCII (such as U+0085) are escaped as \uXXXX, which serde_json leaves raw. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011Sm13qU55Kobe2fHFiLN22
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17480a6734
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Addresses the second Codex round on #40: U+2028 and U+2029 break lines in Unicode-aware renderers, and a name starting with " could pass for another name's quoted form. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011Sm13qU55Kobe2fHFiLN22
Requested by George · project thread
Before: a file named
odd\nname.txt(with a real newline) showed up inlist,glob,grepandchangesas two lines, so the agent couldn't tell what the path was.After: a path holding any control character is shown as a quoted JSON string (
"/d/odd\nname.txt"), which is also exactly what the agent passes back as a tool argument. Ordinary paths are unchanged. Theinitializeinstructions say so in one sentence.How: one helper,
shown(), incrates/sandfs-mcp/src/tools.rs, applied where those four tools and the instructions render a path. No core or API changes. Closes #31.This change was made by dogfooding: the edit,
cargo fmt, tests and clippy all ran inside a sandfs fork of this checkout mounted over FUSE, andsandfs changeslisted the two files that were copied back for the commit.Tests:
cargo test -p sandfs-mcp(new testpaths_with_control_characters_are_shown_quoted).Generated by Claude Code