Skip to content

fix: preserve leading @ in tool paths - #163

Closed
skys-mission wants to merge 1 commit into
stepfun-ai:mainfrom
skys-mission:fix/leading-at-tool-paths
Closed

skys-mission wants to merge 1 commit into
stepfun-ai:mainfrom
skys-mission:fix/leading-at-tool-paths

Conversation

@skys-mission

@skys-mission skys-mission commented Sep 23, 2026

Copy link
Copy Markdown

Problem

Tool paths beginning with a literal @ are resolved without that character. If both @scope/sample.txt and scope/sample.txt exist, read_file asked for the former silently reads the latter. write_file can likewise target the wrong directory.

Client reproduction

Create @scope/sample.txt containing EXPECTED and scope/sample.txt containing WRONG. Ask Step to call read_file with the exact path @scope/sample.txt. Before this fix, the tool returns 1: WRONG; afterward, it returns 1: EXPECTED.

Fix

Preserve the leading @ when resolving tool paths. CLI @file arguments are processed separately and retain their existing behavior.

Verification

  • Added a Step tool profile regression test for reading and writing an @-prefixed path.
  • Reproduced the issue and verified the fix in the Step client with the same read_file call.
  • npm run check
  • ./test.sh

Screenshots

Before fix: Step returns WRONG when asked to read @scope/sample.txt.

before-fix

Reproduction files: @scope/sample.txt contains EXPECTED, while scope/sample.txt contains WRONG.

file-contents

After fix: The same request returns EXPECTED.

after-fix

@skys-mission

Copy link
Copy Markdown
Author

Rechecked the documented @ path behavior; closing this PR because the proposed change would alter the intended behavior.

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.

1 participant