codex - 💡(How to fix) Fix Add an option to collapse hook-injected context in the CLI transcript [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20766Fetched 2026-05-03 04:45:56
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×5unlabeled ×2commented ×1

Root Cause

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" />

Fix Action

Fix / Workaround

Current workarounds are not ideal:

RAW_BUFFERClick to expand / collapse

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" />

extent analysis

TL;DR

Add a configuration option to collapse additional context in the CLI transcript without affecting model behavior.

Guidance

  • Consider adding a collapse_additional_context option to the [feature] section of the configuration file to enable compact representation of additional context in the CLI transcript.
  • Consider implementing a toggle or expand/collapse button in the TUI to allow users to view the full additional context on demand.
  • Review the current workarounds and their limitations to ensure the proposed solution addresses the usability concerns without compromising automation or model behavior.
  • Evaluate the potential impact of the proposed solution on existing workflows and automation scripts.

Notes

The proposed solution aims to improve CLI usability while preserving model behavior, but its implementation may require careful consideration of the trade-offs between usability, automation, and model performance.

Recommendation

Apply workaround: Implement the proposed collapse_additional_context configuration option to improve CLI usability while preserving model behavior, as it addresses the current limitations of the workarounds and provides a more robust solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Add an option to collapse hook-injected context in the CLI transcript [1 comments, 2 participants]