mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 03:01:56 +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. |
||
|---|---|---|
| .. | ||
| custom-tools | ||
| hooks | ||
| oauth | ||
| tools | ||
| agent-session.ts | ||
| bash-executor.ts | ||
| compaction.ts | ||
| export-html.ts | ||
| index.ts | ||
| messages.ts | ||
| model-config.ts | ||
| model-resolver.ts | ||
| session-manager.ts | ||
| settings-manager.ts | ||
| skills.ts | ||
| slash-commands.ts | ||
| system-prompt.ts | ||