Skip to content

[Bug] 'Claude' injected into file paths by subagents (recurring) #61

@randomm

Description

@randomm

Summary

Subagents are accessing paths with 'Claude' injected into them, e.g.:

  • ~/git/Claude/packages/opencode/src/session instead of ~/git/opencode/packages/opencode/src/session

This is a recurring issue that has been fixed before but keeps reappearing.

Reproduction

  • Run opencode from ~/git/opencode
  • Launch a subagent task that reads files
  • Observe permission prompt shows ~/git/Claude/... path

Expected

Paths should use the actual working directory: ~/git/opencode/...

Likely cause

The LLM (Claude) may be hallucinating its own name into paths, OR there's a config/prompt that references 'Claude' as a directory name. Could also be a stale reference in AGENTS.md, session context, or instance directory resolution.

Previous fixes

This has been fixed multiple times already — check git history for prior approaches.

Related

  • Subagent task execution
  • Instance.directory / Instance.worktree resolution

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