/file/status returns paths outside requested directory scope #9284

Open
opened 2026-02-16 18:12:05 -05:00 by yindo · 1 comment
Owner

Originally created by @jacksonzamorano on GitHub (Feb 13, 2026).

Originally assigned to: @thdxr on GitHub.

Description

When calling OpenCode GET /file/status with directory=~/Developer/y, some returned path values are relative to the server directory (for example ../x/...) instead of the selected directory. The file list is still correct, but the paths roots are not correct.

Plugins

None

OpenCode version

1.1.61

Steps to reproduce

  1. Start OpenCode server in ~/Developer/x.
  2. Run GET /file/status?directory=~/Developer/y
  3. Inspect returned file status paths.

Screenshot and/or share link

No response

Operating System

macOS 26.3

Terminal

Ghostty

Originally created by @jacksonzamorano on GitHub (Feb 13, 2026). Originally assigned to: @thdxr on GitHub. ### Description When calling OpenCode GET /file/status with directory=~/Developer/y, some returned path values are relative to the server directory (for example ../x/...) instead of the selected directory. The file list is still correct, but the paths roots are not correct. ### Plugins None ### OpenCode version 1.1.61 ### Steps to reproduce 1. Start OpenCode server in ~/Developer/x. 2. Run GET /file/status?directory=~/Developer/y 3. Inspect returned file status paths. ### Screenshot and/or share link _No response_ ### Operating System macOS 26.3 ### Terminal Ghostty
yindo added the bug label 2026-02-16 18:12:05 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 13, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #12394: fix: normalize file paths in read tool output - directly addresses path normalization with relative paths being returned
  • #11059: Read permission doesn't look to match when the agent uses ../.. paths - similar pattern of relative paths with ../
  • #4967: opencode attach: File path duplicates client's relative directory, causing ENOENT - path scope not properly tracked
  • #4686: TUI sends absolute local paths causing ENOENT on server side - directory scope not respected
@github-actions[bot] commented on GitHub (Feb 13, 2026): This issue might be a duplicate of existing issues. Please check: - #12394: fix: normalize file paths in read tool output - directly addresses path normalization with relative paths being returned - #11059: Read permission doesn't look to match when the agent uses ../.. paths - similar pattern of relative paths with `../` - #4967: `opencode attach`: File path duplicates client's relative directory, causing ENOENT - path scope not properly tracked - #4686: TUI sends absolute local paths causing ENOENT on server side - directory scope not respected
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9284