Skip to content

AGENTS being pulled from subtree #18044

@appsforartists

Description

@appsforartists

What happened?

I was just working on a PR to home-manager. The agent's personality completely changed between sessions an hour apart. I asked why, and it cited this random file deep in the tree: tests/modules/programs/codex/AGENTS.md

I don't know what made it pick up that AGENTS file now and not in any other session. I thought it only considered AGENTS folders in pwd and above.

What did you expect to happen?

AGENTS files are consistently selected between sessions. Files in project root and higher are considered. AGENTS files in subfolders are only considered when operating on files within them.

Client information

  • CLI Version: 0.26.0
  • Git Commit: a380b42
  • Session ID: a3fb9a22-b022-4ed9-89ca-2b657510624e
  • Operating System: darwin v24.13.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-2.5
  • Memory Usage: 255.8 MB
  • Terminal Name: ghostty 1.2.3
  • Terminal Background: fix .env check #123
  • Kitty Keyboard Protocol: Supported

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitystatus/need-triageIssues that need to be triaged by the triage automation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions