Skip to content

Bug: Subagents using wrong working directory (~/git/Claude instead of project dir) #50

Description

@randomm

Problem

Subagents are executing from ~/git/Claude instead of the actual project directory ~/git/opencode. This causes:

  1. Permission prompts showing wrong paths (e.g., ~/git/Claude/packages/opencode/...)
  2. "Access external directory" warnings for files that are actually inside the project

Expected Behavior

Subagents should inherit the working directory from the parent session.

Reproduction

  1. Start opencode in ~/git/opencode
  2. Dispatch a task to any subagent
  3. Observe the file paths in permission prompts show ~/git/Claude instead

Notes

  • This bug was fixed earlier today but has recurred
  • May be related to session/context passing to subagents
  • Affects: @developer, @explore, @git-agent, etc.

Priority

High - affects all delegated work and causes confusing permission prompts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions