Add first-class Codex support for Segments context injection #1

Open
opened 2026-05-22 21:38:53 +01:00 by NocFA · 0 comments
Owner

Segments currently works with Codex on my machine through a
global workaround:

  • ~/.codex/config.toml registers the Segments MCP server.
  • ~/.codex/hooks.json runs /Users/noc/.local/bin/ segments context on SessionStart.
  • Per-repo Codex instructions require a local AGENTS.md -> CLAUDE.md symlink because Codex reads AGENTS.md.

I need to add official Codex support so this does not need to
be hand-wired per machine/session.

Desired behavior:

  • Provide a supported setup/doctor path for Codex.
  • Configure or validate the Segments MCP entry.
  • Configure or validate the Codex SessionStart context
    hook.
  • Confirm that a new Codex chat in a Segments project
    receives the same segmentsContext banner automatically.
  • Document the repo-instructions story for Codex, including
    whether AGENTS.md symlinks are expected or avoidable.

Acceptance criteria:

  • segments doctor codex reports MCP status, hook status,
    and current-project context status.
  • A fresh Codex chat in a Segments-initialized repo gets
    project context without manual setup.
  • Existing MCP tools, including Basic Memory, can coexist
    without clobbering Codex config.
Segments currently works with Codex on my machine through a global workaround: - `~/.codex/config.toml` registers the Segments MCP server. - `~/.codex/hooks.json` runs `/Users/noc/.local/bin/ segments context` on `SessionStart`. - Per-repo Codex instructions require a local `AGENTS.md -> CLAUDE.md` symlink because Codex reads `AGENTS.md`. I need to add official Codex support so this does not need to be hand-wired per machine/session. Desired behavior: - Provide a supported setup/doctor path for Codex. - Configure or validate the Segments MCP entry. - Configure or validate the Codex `SessionStart` context hook. - Confirm that a new Codex chat in a Segments project receives the same `segmentsContext` banner automatically. - Document the repo-instructions story for Codex, including whether `AGENTS.md` symlinks are expected or avoidable. Acceptance criteria: - `segments doctor codex` reports MCP status, hook status, and current-project context status. - A fresh Codex chat in a Segments-initialized repo gets project context without manual setup. - Existing MCP tools, including Basic Memory, can coexist without clobbering Codex config.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
NocFA/segments#1
No description provided.