Context Duplication in Worktrees Causing Excessive Context Consumption
Resolved 💬 3 comments Opened Jul 9, 2025 by myaroshefsky Closed Jan 5, 2026
Bug Description
I'm working in worktrees so that I can parallel work with multiple claude code agents, and i just discovered that claude code run in a worktree is reading in both the claude.md file inside the worktree and in the parent, resulting in double the consumed context. Running --add-dir doesn't help. Output that informed me:
claude --add-dir .
⚠ Large /Users/yaro/Code/Memvia/memvia/CLAUDE.md will impact performance (40.8k chars >
40.0k) • /memory to edit
⚠ Large CLAUDE.md will impact performance (41.1k chars > 40.0k)
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 1.0.44
- Feedback ID: 4feb0ea6-0b4d-49d6-b293-f9980f8a298c
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗