mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
When cwd is `~/.pi/agent/` or a subdirectory, the global AGENTS.md file was included twice in the system prompt. `loadProjectContextFiles()` loads context files in two steps: 1. Explicitly loads from `getAgentDir()` (`~/.pi/agent/`) 2. Walks from cwd up to root, collecting all AGENTS.md/CLAUDE.md files There was no deduplication. When cwd is at or below `~/.pi/agent/`, the ancestor walk includes that directory again. Fix: track seen paths with a Set and skip duplicates. |
||
|---|---|---|
| .. | ||
| agent | ||
| ai | ||
| coding-agent | ||
| mom | ||
| pods | ||
| proxy | ||
| tui | ||
| web-ui | ||