Skip to content

Docs: SessionStart source field omits clear value #19666

Open

Description

@jozefizso

What is the documentation issue?

The Codex hooks documentation appears to be internally inconsistent about the possible values for the SessionStart event source field.

On the Hooks page, the matcher table says:

SessionStart start source: Current runtime values are startup, resume, and clear

The examples directly below it also include:

startup|resume|clear

But the SessionStart event-specific field table says:

source string: How the session started: startup or resume

Why this matters

Hook configurations commonly use matcher against the SessionStart.source value. If someone follows the event-specific field table, they may configure a matcher such as startup|resume and unintentionally skip hooks after /clear, even though the matcher section documents clear as a current runtime value.

One concrete example is a startup hook that runs bd prime to load workspace issue-tracker context. With matcher: "startup|resume", the hook runs on normal startup and resume, but not after /clear, leaving the session without the expected context.

Suggested fix

Update the SessionStart.source field description to include clear, or otherwise clarify whether clear is a supported public runtime value for SessionStart.

Relevant docs page: https://developers.openai.com/codex/hooks#sessionstart

Activity

  1. added
    documentationImprovements or additions to documentation
    CLIIssues related to the Codex CLI
    hooksIssues related to event hooks
    on Apr 26, 2026
  2. nightcityblade commented on Apr 28, 2026

    @nightcityblade

    Hi, I'd like to work on this. I'll submit a PR shortly.

  3. oxysoft commented on May 8, 2026

    @oxysoft

    Indexed this hook ticket in the umbrella tracker: #21753

    Goal: collect the scattered Codex hook requests and bugs into one parity matrix for Full Claude Code Hook Parity (29+), while preserving this issue as the detailed thread for its specific behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationhooksIssues related to event hooks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions