Skip to content

entire enable --agent codex can create .codex/config.toml under ~/.codex/agents and trigger Codex warning #842

@sanogueralorenzo

Description

@sanogueralorenzo

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

  1. Create or place a git repository under a path inside ~/.codex/agents, for example:

    ~/.codex/agents/repos/project

  2. In that repository, run:

    entire enable --agent codex
  3. Start Codex CLI in that repository.

Actual behavior

entire enable --agent codex creates:

~/.codex/agents/repos/project/.codex/config.toml

with:

[features]
codex_hooks = true

Then 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions