Skip to content

Add an option to collapse hook-injected context in the CLI transcript #20766

Closed as duplicate

Description

@hzb666

What variant of Codex are you using?

CLI

What feature would you like to see?

Add a config option such as:

[feature]
collapse_additional_context = true

When enabled:

  • Hooks should still execute normally.
  • additionalContext should still be included in the model-visible context.
  • The CLI transcript should show a compact placeholder instead of the full content, for example:

Hook context injected: UserPromptSubmit (collapsed, 2.4 KB)

Ideally the user could expand it on demand in the TUI.

Additional information

Why this matters

This would let projects keep robust hook-based workflow automation without flooding the interactive CLI with repeated system/developer context blocks.

Current workarounds are not ideal:

  • Removing the hook loses automation.
  • Shortening additionalContext changes what the model receives.
  • Moving logic into project instructions loses dynamic per-turn context.

A UI-only collapse option would preserve model behavior while improving CLI usability.

Image
Image

Activity

  1. added
    CLIIssues related to the Codex CLI
    hooksIssues related to event hooks
    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal display
    configIssues involving config.toml, config keys, config merging, or config updates
    on May 2, 2026
  2. github-actions commented on May 2, 2026

    @github-actions
    Contributor
  3. removed
    CLIIssues related to the Codex CLI
    configIssues involving config.toml, config keys, config merging, or config updates
    on May 2, 2026
  4. 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.

  5. etraut-openai commented on Oct 13, 2026

    @etraut-openai
    Contributor

    (response from codex)

    Closing in favor of #21696, which tracks keeping hook additionalContext for the model without flooding the TUI. The expandable compact placeholder proposed here is a useful display option for that work.

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

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or requesthooksIssues related to event hooks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions