Filed by an agent triaging a local usability report.
Environment
rhei-cli 0.3.1 (rhei version)
rhei/main at commit 12a431c907fb4a85a8feb5f9160b506197cedd04
Reproduction
I created a Git repository at /tmp/rhei1-repro-20260830 with a tracked,
hand-written AGENTS.md. Its ordinary child directory
/tmp/rhei1-repro-20260830/host had no AGENTS.md of its own. I then ran:
/home/vjovanov/.cargo/bin/rhei init /tmp/rhei1-repro-20260830/host --here
The command exited 0 and printed:
Initialized Panta project "Host" with no rheis yet.
Also changed in the host directory: .gitignore
Wrote the agent-discovery note to rhei1-repro-20260830/AGENTS.md (the repository root).
It created host/index.panta.md and host/.gitignore, but did not create
host/AGENTS.md. Instead, it appended the agent-discovery note to the
enclosing repository root's tracked AGENTS.md, as confirmed by git diff.
Expected behavior
When --here is given a host directory, the agent-discovery note should be
written within that supplied host directory, or rhei should clearly identify
the file it is about to modify and ask for confirmation. Walking up past the
host and changing an enclosing repository's hand-written, tracked
AGENTS.md is surprising and can modify unrelated project instructions.
In this setup the impact was avoided because a scratch run exposed the
behavior and the actual invocation used --no-agents. The workaround is to
always pass --no-agents, which also prevents the automatic note from being
written.
Filed by an agent triaging a local usability report.
Environment
rhei-cli 0.3.1(rhei version)rhei/mainat commit12a431c907fb4a85a8feb5f9160b506197cedd04Reproduction
I created a Git repository at
/tmp/rhei1-repro-20260830with a tracked,hand-written
AGENTS.md. Its ordinary child directory/tmp/rhei1-repro-20260830/hosthad noAGENTS.mdof its own. I then ran:The command exited 0 and printed:
It created
host/index.panta.mdandhost/.gitignore, but did not createhost/AGENTS.md. Instead, it appended the agent-discovery note to theenclosing repository root's tracked
AGENTS.md, as confirmed bygit diff.Expected behavior
When
--hereis given a host directory, the agent-discovery note should bewritten within that supplied host directory, or
rheishould clearly identifythe file it is about to modify and ask for confirmation. Walking up past the
host and changing an enclosing repository's hand-written, tracked
AGENTS.mdis surprising and can modify unrelated project instructions.In this setup the impact was avoided because a scratch run exposed the
behavior and the actual invocation used
--no-agents. The workaround is toalways pass
--no-agents, which also prevents the automatic note from beingwritten.