Codex App: support spoiler-style hidden text in prompts (`||...||`)
Summary
Add spoiler-style formatting to prompts, similar to Discord's ||hidden content|| syntax.
When a user sends a prompt containing text wrapped in double pipes, the Codex conversation UI should render that fragment as visually concealed. Clicking or activating it with the keyboard should reveal the content, and activating it again should hide it.
The concealed text must still be included in the prompt sent to Codex. This feature is about visual privacy and presentation, not excluding content from model context.
Values marked as concealed should also remain visually concealed if Codex repeats them while working, including in streamed agent progress/commentary messages and visible tool or command activity.
Motivation
Prompts can contain values that users need Codex to read but may not want continuously visible on screen, especially during screen sharing, recordings, screenshots, presentations, or pair-programming sessions.
It would also help reduce visual clutter for long identifiers or optional context while keeping that information available on demand.
Hiding the value only in the original user message is not sufficient. During a long-running task, Codex may repeat the value in progress updates such as “I am now checking tenant customer-production,” or expose it in a displayed command. That would defeat the visual concealment at the moment it is most useful.
Prompt example
Prompt entered:
Use tenant ||customer-production|| and reference issue ||INC-12345||.
Rendered after sending:
Use tenant [hidden] and reference issue [hidden].
Clicking either hidden section reveals only that section.
Agent progress example
If Codex generates this progress update:
I am checking the configuration for tenant customer-production.
The UI should render it as:
I am checking the configuration for tenant [hidden].
The same rule should apply while the update is streaming, so the raw value is never briefly painted before being concealed.
Expected behavior
- Support inline and multiline content between
||delimiters. - Render the content as concealed in the sent user message and when conversation history is reopened.
- Treat values marked with
||...||as visually concealed values for the entire turn. - If Codex repeats an exact concealed value in an agent progress/commentary message, render that occurrence as concealed too.
- Apply the concealment before displaying streamed text, avoiding a momentary raw-text flash.
- Conceal the same value in visible tool or command activity associated with the turn when it appears in command text, previews, or output.
- Ideally preserve the same behavior in the final answer as well, so the value is not revealed by a later agent message.
- Let users reveal and hide each section with a click or keyboard action.
- Keep the inner content available to the model as part of the prompt.
- Provide an escaping mechanism for literal
||. - Make the control accessible and clearly indicate its hidden/revealed state.
- Optionally offer “reveal all” / “hide all” for messages with multiple concealed sections.
Security clarification
This must be described as a display-only privacy feature, not encryption or secret management. The hidden value is still transmitted to Codex, may be used in commands or tool calls, and is retained according to the same policies as the rest of the conversation.
Concealing a value in rendered progress and tool activity reduces accidental on-screen exposure, but it does not prevent the model, tools, processes, logs, or external services from receiving that value. The UI should make this distinction clear so users do not mistake spoiler formatting for protection of credentials or other secrets.
Prior search
I searched the existing issues for “spoiler”, “hidden prompt”, “click to reveal”, “mask values”, and Discord-style syntax, and did not find an exact duplicate.