Internal ChatGPT Desktop tasks trigger Codex hooks with non-resumable session IDs

Open 💬 0 comments Opened Jul 15, 2026 by henryjing96

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.707.72221

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

ChatGPT Desktop runs internal Codex background tasks for features such as personalized project suggestions. These internal tasks trigger user-configured Codex hooks as if they were normal user-created tasks.

I received hook events for an internal task whose prompt began with:

# Overview Generate 0 to 3 hyperpersonalized suggestions for what this user can do with Codex in this local project...

The hook supplied the following session ID:

***-***-***

This session had no corresponding rollout under ~/.codex/sessions and was not a user-visible task. My hook-based task-status integration therefore displayed a phantom ChatGPT task as Working.

Attempting to open the session using:

codex://threads/***-***-***

failed with:

Failed to resume task
no rollout found for thread id ***-***-***

ChatGPT Desktop also logged:

Received turn/completed for unknown conversation

There is currently no documented field that allows hook consumers to reliably distinguish user-visible, resumable tasks from internal ephemeral ChatGPT Desktop tasks.

<img width="684" height="174" alt="Image" src="https://github.com/user-attachments/assets/da5660a0-ca4d-4195-87ab-985bdecef41f" />
<img width="674" height="232" alt="Image" src="https://github.com/user-attachments/assets/79dd00b3-4fbd-4d51-ac56-7b99222f6257" />
<img width="603" height="96" alt="Image" src="https://github.com/user-attachments/assets/7fdefb40-fb60-4e6b-92a3-913f07e3d9eb" />

What steps can reproduce the bug?

  1. Add a simple hook logger to ~/.codex/hooks.json:

``json
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "tee -a /tmp/codex-hook-events.jsonl >/dev/null"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "tee -a /tmp/codex-hook-events.jsonl >/dev/null"
}
]
}
]
}
}
``

  1. Review and trust the hooks using /hooks.
  2. Open a local project in ChatGPT Desktop.
  3. Wait for the app to generate personalized project suggestions.
  4. Inspect /tmp/codex-hook-events.jsonl.
  5. Observe a UserPromptSubmit event with a prompt beginning with # Overview.
  6. Search ~/.codex/sessions for the received session_id and confirm that no rollout exists.
  7. Try to open codex://threads/<session_id>.
  8. Confirm that ChatGPT Desktop reports:

``text
no rollout found for thread id
``

What is the expected behavior?

Internal ChatGPT Desktop background tasks should either:

  1. Not trigger user-configured Codex lifecycle hooks; or
  2. Include a documented discriminator that allows hook consumers to identify and ignore them.

For example:

{
  "session_visibility": "internal",
  "session_persistence": "ephemeral",
  "resumable": false,
  "surface": "chatgpt_desktop"
}

User-visible tasks should remain distinguishable from internal tasks without filtering prompt text or depending on the internal ~/.codex/sessions filesystem layout.

If internal sessions trigger hooks, their lifecycle events should also remain balanced so integrations do not retain a permanently Working task.

Additional information

_No response_

View original on GitHub ↗