Skip to content

[Bug]: Pi does not receive the shared global AGENTS.md #38

Description

@SimplyAvi

What happened?

home.nix links home/AGENTS.md into three harness locations:

  • .claude/CLAUDE.md
  • .codex/AGENTS.md
  • .config/opencode/AGENTS.md

Pi's documented global instructions path, ~/.pi/agent/AGENTS.md, is not among them, so a Pi session started from this config loads no global rules. Project-level AGENTS.md still resolves normally, since Pi walks the current directory and its parents. Only the global layer is absent.

I am genuinely unsure whether this is intentional. The README says "Agent configs (Claude, Codex, opencode all share one AGENTS.md)" and describes Pi's config separately as "theme and local extensions, generic UI settings and model overrides", so the omission may be deliberate scope rather than an oversight. Filing it as a question rather than a patch, since Pi is treated as a co-primary harness elsewhere in the setup and the asymmetry surprised me.

What did you expect to happen?

Either Pi also loads the shared AGENTS.md, or the README states explicitly that Pi is excluded from it, so the difference is discoverable without diffing home.nix.

Reproduction steps

  1. Apply the config with ./bootstrap.sh or ./rebuild.sh.
  2. ls ~/.pi/agent/AGENTS.md - the file does not exist, while ~/.claude/CLAUDE.md, ~/.codex/AGENTS.md, and ~/.config/opencode/AGENTS.md all resolve to home/AGENTS.md.
  3. From a directory with no AGENTS.md or CLAUDE.md anywhere up the tree, run Pi non-interactively and ask it to quote one of the global rules. Nothing is loaded.

Per Pi's own docs/quickstart.md:

Pi loads:

  • ~/.pi/agent/AGENTS.md for global instructions
  • AGENTS.md or CLAUDE.md from parent directories and the current directory

Environment

macOS

Nix or home-manager generation

n/a - the difference is visible in home.nix itself

Relevant logs or output

$ ls -l ~/.claude/CLAUDE.md ~/.codex/AGENTS.md ~/.config/opencode/AGENTS.md
# all three resolve to home/AGENTS.md

$ ls -l ~/.pi/agent/AGENTS.md
ls: /Users/<user>/.pi/agent/AGENTS.md: No such file or directory

If it is unintentional, the fix is one more link alongside the existing three:

home.file.".pi/agent/AGENTS.md".source =
  config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md";

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