-
Notifications
You must be signed in to change notification settings - Fork 279
entire enable --agent codex can create .codex/config.toml under ~/.codex/agents and trigger Codex warning #842
Description
Summary
When entire enable --agent codex is run in a repository located under ~/.codex/agents/..., it creates a repo-local .codex/config.toml that Codex later interprets as an agent role file and warns about at startup.
This seems to happen because ~/.codex/agents is a reserved tree that Codex uses for agent-role discovery, and in some setups it is also used to hold git worktrees/checkouts.
Steps to reproduce
-
Create or place a git repository under a path inside
~/.codex/agents, for example:~/.codex/agents/repos/project -
In that repository, run:
entire enable --agent codex -
Start Codex CLI in that repository.
Actual behavior
entire enable --agent codex creates:
~/.codex/agents/repos/project/.codex/config.toml
with:
[features]
codex_hooks = trueThen Codex CLI shows this warning:
⚠ Ignoring malformed agent role definition: agent role file at ~/.codex/agents/repos/project/.codex/config.toml must define `developer_instructions`
Expected behavior
Enabling Codex hooks should not create a config file that Codex will later interpret as an agent-role definition when the repository lives under ~/.codex/agents/....
Possible fix
Enable features.codex_hooks = true in $CODEX_HOME/config.toml, or use another location that does not conflict with Codex agent-role discovery.