Add an option to collapse hook-injected context in the CLI transcript
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.
<img width="2533" height="137" alt="Image" src="https://github.com/user-attachments/assets/0b84c20f-fffd-40c0-9cfb-41dfbcfe8a63" />
<br>
<img width="2513" height="1024" alt="Image" src="https://github.com/user-attachments/assets/4dc1db8f-300c-4f20-a6ae-4ed79edea685" />
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
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.