Skip to content

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

@hzb666

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

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions