[tool]
name = "codex"
display_name = "Codex"
version = "1.0"
# OpenAI Codex CLI stores session data under ~/.codex/sessions/ keyed on
# absolute `cwd`. Nothing project-local to rewrite yet, so on_move is
# `notify` until v0.4 `migrate` lands home-dir reconciliation.
#
# Detection hinges on markers placed inside the project tree: AGENTS.md
# (the shared multi-agent project manifest) and an optional .codex/
# directory for per-project config overrides.
on_move = "notify"
binary = "codex"

session_patterns = [
  "AGENTS.md",
  ".codex/",
]

# Codex respects the `CODEX_HOME` env var and falls back to `~/.codex`
# when it isn't set. That makes this a clean `discovery = "env"` case
# for `sessionguard migrate` (v0.4): relocate the data, then either
# export `CODEX_HOME` system-wide (shell rc) or, when Codex is running
# under a systemd-user unit, drop a `[Service] Environment=CODEX_HOME=…`
# override. See `docs/design/migrate.md`.
[tool.home_dir_layout]
default_path = "~/.codex"
discovery = "env"
env_var = "CODEX_HOME"
