Skip to content

fix(acp): use POSIX path semantics for ACP wire format paths#1285

Merged
claude-code-best merged 1 commit into
claude-code-best:mainfrom
Ericcc-Ma:fix/acp-posix-paths
Jun 25, 2026
Merged

fix(acp): use POSIX path semantics for ACP wire format paths#1285
claude-code-best merged 1 commit into
claude-code-best:mainfrom
Ericcc-Ma:fix/acp-posix-paths

Conversation

@Ericcc-Ma

@Ericcc-Ma Ericcc-Ma commented Jun 25, 2026

Copy link
Copy Markdown

ToolCallLocation.path and Diff.path emitted over ACP must be absolute and POSIX-style per the v1 spec (tool-calls.mdx:304-306). The previous code used platform-specific node:path which on Windows prepends the drive letter (e.g. "D:...") to POSIX-style inputs like "/Users/test/project" — silently corrupting paths emitted to ACP clients on Windows hosts. CI runs on Linux so the latent issue went undetected. Switch to node:path/posix so the path normalisation is host-OS independent.

Summary by CodeRabbit

  • Bug Fixes
    • Standardized path handling to always use forward slashes in ACP-related path output.
    • Improved consistency of displayed paths across platforms, including Windows.
    • Reduced the risk of Windows-specific drive-letter or separator formatting appearing in emitted path values.

ToolCallLocation.path and Diff.path emitted over ACP must be absolute
and POSIX-style per the v1 spec (tool-calls.mdx:304-306). The previous
code used platform-specific `node:path` which on Windows prepends the
drive letter (e.g. "D:\...") to POSIX-style inputs like
"/Users/test/project" — silently corrupting paths emitted to ACP
clients on Windows hosts. CI runs on Linux so the latent issue went
undetected. Switch to `node:path/posix` so the path normalisation is
host-OS independent.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fa5c5ef4-fc14-4ccf-9625-7d523bb5aefa

📥 Commits

Reviewing files that changed from the base of the PR and between 751efb8 and 106fd50.

📒 Files selected for processing (2)
  • src/services/acp/bridge/paths.ts
  • src/services/acp/utils.ts

📝 Walkthrough

Walkthrough

ACP path helpers now use POSIX path semantics for emitted bridge paths and display paths. Comments were updated to describe platform-independent path formatting, and toDisplayPath now returns the POSIX relative path directly.

Changes

ACP POSIX path handling

Layer / File(s) Summary
POSIX path semantics
src/services/acp/bridge/paths.ts, src/services/acp/utils.ts
ACP bridge path emission and display-path formatting switch to node:path/posix, and toDisplayPath returns the POSIX relative path directly. The related comments describe ACP path values as POSIX-formatted and platform-independent.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A bunny hops on / today,
No backslashes in the way.
ACP paths now feel quite neat,
POSIX paws on every street.
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: switching ACP path handling to POSIX semantics for wire-format paths.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@claude-code-best claude-code-best merged commit 10327e0 into claude-code-best:main Jun 25, 2026
2 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