Skip to content

Codex adapter: implement SubagentStart/SubagentStop hook support #286

Description

@antejavor

Context

Codex's docs describe subagent-related hooks (subagent hooks report the parent's session_id, per research done during Map: Harness-grounded graph model across the Context Graph family), but agent-context-graph's codex.py adapter never implemented them — _SUPPORTED_HOOKS only covers SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PermissionRequest, Stop. No AgentStartEvent/AgentEndEvent construction exists for Codex at all, so no (:Agent) node (map #275, tickets #277/#278) is ever created for a Codex session today, regardless of whether Codex itself spawns something analogous to a subagent.

Surfaced while scoping a new map for live-harness verification of the SPAWNED subagent-nesting inference rule — verifying against a real Codex session turned out to be blocked on this gap, and was ruled out of scope for that map rather than bundled in, since this is real adapter-design work (what does Codex's actual subagent hook payload look like? does its agent_id concept work the same way as Claude Code's?) rather than a testing-methodology decision.

Scope

  • Determine Codex's actual subagent-hook payload shape (may need its own research pass against current Codex docs/CLI, not assumed from memory).
  • Wire SubagentStart/SubagentStop-equivalent hooks into codex.py, mirroring claude_code.py's AgentStartEvent/AgentEndEvent construction.
  • Likely candidate for its own wayfinder map, given the open design questions above.

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