-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Codex CLI renders hook additionalContext as visible developer message #16933
Description
Summary
Codex CLI is rendering hook hookSpecificOutput.additionalContext as a visible developer message in the session transcript.
This appears to contradict the documented behavior used by the Hindsight Codex integration, which says auto-recall should be "invisible to the transcript, visible to Codex".
Environment
- Codex CLI version:
0.118.0 - Platform: Linux
- Hook integration: Hindsight Codex integration
Expected behavior
When a UserPromptSubmit hook returns:
{
"hookSpecificOutput": {
"hookEventName": "UserPromptSubmit",
"additionalContext": "..."
}
}the additionalContext should be available to the model without being shown in the user-visible transcript.
Actual behavior
The additionalContext payload is inserted into the session as a visible developer message containing the full Hindsight memory block.
In the same setup, Codex also shows visible UI status like:
• Running Stop hook
The main bug here is the visible transcript rendering of additionalContext.
Reproduction
- Enable Codex hooks.
- Configure a
UserPromptSubmithook that returnshookSpecificOutput.additionalContext. - Use the Hindsight Codex integration, or any minimal hook that returns hidden context this way.
- Start a session and submit a prompt.
- Observe that the hook context is shown in the transcript as a visible
developermessage.
Relevant docs
Hindsight integration docs state that auto-recall is:
- "invisible to the transcript"
- "visible to Codex"
Reference:
Local evidence
The Hindsight hook returns additionalContext here:
output = {
"hookSpecificOutput": {
"hookEventName": "UserPromptSubmit",
"additionalContext": context_message,
}
}
json.dump(output, sys.stdout)And the resulting session log contains it as a visible developer message:
{"type":"response_item","payload":{"type":"message","role":"developer", ... "<hindsight_memories> ... </hindsight_memories>"}}Notes
This may be:
- a Codex CLI regression in how hook
additionalContextis rendered, or - a mismatch between current Codex behavior and the documented hook contract relied on by integrations.