Subagents should use project-local relative paths for repo operations #249

Closed
opened 2026-05-18 11:11:18 -07:00 by jwilger · 0 comments
Owner

Problem

Subagents, especially those running on Spark, sometimes invoke repository-local operations such as git diff with an absolute path rooted at the user's home directory (for example ~/projects/auto_review/...) instead of using project-local relative paths such as . or paths relative to the repository root.

Even when the target path is inside the current project, opencode can treat the absolute path as outside the project permission boundary. That triggers a permission prompt in the main agent while the subagent output appears to hang.

Expected behavior

Agents should use project-local relative paths for repository operations whenever the target is inside the current project, for example:

  • git diff
  • git diff -- <relative/path>
  • . for whole-repository operations

They should avoid home-directory absolute paths for project-local work.

Impact

  • Avoids unnecessary permission prompts.
  • Prevents subagent sessions from appearing stalled while the main agent awaits permission.
  • Keeps tool usage aligned with project-local scope hygiene.

Notes

This may also expose an opencode permission-boundary bug for absolute paths that resolve inside the workspace, but this ticket is scoped to making our agents consistently use relative project-local paths.

## Problem Subagents, especially those running on Spark, sometimes invoke repository-local operations such as `git diff` with an absolute path rooted at the user's home directory (for example `~/projects/auto_review/...`) instead of using project-local relative paths such as `.` or paths relative to the repository root. Even when the target path is inside the current project, opencode can treat the absolute path as outside the project permission boundary. That triggers a permission prompt in the main agent while the subagent output appears to hang. ## Expected behavior Agents should use project-local relative paths for repository operations whenever the target is inside the current project, for example: - `git diff` - `git diff -- <relative/path>` - `.` for whole-repository operations They should avoid home-directory absolute paths for project-local work. ## Impact - Avoids unnecessary permission prompts. - Prevents subagent sessions from appearing stalled while the main agent awaits permission. - Keeps tool usage aligned with project-local scope hygiene. ## Notes This may also expose an opencode permission-boundary bug for absolute paths that resolve inside the workspace, but this ticket is scoped to making our agents consistently use relative project-local paths.
jwilger added this to the 1.0 milestone 2026-05-18 11:11:27 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Slipstream/auto_review#249
No description provided.