Codex Desktop thread tools intermittently lose handlers and may create systemError worker threads after create_thread failure
Summary
In Codex Desktop on Windows, the thread-management tool surface can intermittently expose tools such as list_threads, read_thread, send_message_to_thread, set_thread_title, and create_thread, but the actual call returns No handler registered for tool: ....
In one recent manager/worker workflow this caused a more serious failure mode: create_thread returned a handler error, but delayed verification later showed that the child thread was actually created. A retry then produced a duplicate/orphan worker. The canonical created workers initially appeared as systemError and only became usable after I manually opened/prompted the worker threads.
Related issues I found before filing:
- #28080 - Desktop thread tools intermittently lose handlers
- #29886 - send_message_to_thread reports failure while delivery may have succeeded
- #29275 - new thread creation fails silently / reports errors while thread exists
- #30626 - possibly related threaded/grouped chat workflow state
This issue is for the combined manager/worker failure mode where handler errors, delayed creation, duplicate workers, and systemError child threads occur together.
Environment
- OS: Windows
- App: Codex Desktop
- CLI visible in same environment:
codex-cli 0.142.5 - Shell: PowerShell
- Workspace cwd for the affected threads:
C:\Work\Codebase
Observed behavior
A manager thread attempted to create two bounded worker threads from prepared prompts:
HS-001 Report Command Safety Worker - HydroScope2MRW-003 Water Levels Fixture Worker - HydroScope2
Sequence observed:
list_threadsduplicate checks repeatedly failed with:
``text``
No handler registered for tool: list_threads
- User explicitly approved a narrow blind-create fallback for exactly two named workers.
create_threadfor the first worker returned:
``text``
No handler registered for tool: create_thread
- Delayed verification initially found no candidate, so the manager performed one permitted retry.
- Later delayed verification found two matching worker threads, meaning at least one call that reported a handler error had actually created a thread.
- One worker candidate was selected as canonical. The earlier candidate was marked duplicate/orphan.
set_thread_titleandsend_message_to_threadalso failed withNo handler registered for tool: ....
- Direct
read_threadsometimes worked and sometimes failed across sessions. When it worked, both canonical worker threads initially showedstatus=systemErrorand no acknowledgement.
- After manually opening/prompting the canonical worker threads, both became
activeand acknowledged standby. Direct-IDread_threadthen worked, butlist_threadsstill failed.
Current state after manual recovery:
- Direct
read_threadby known canonical IDs works. list_threadsstill fails withNo handler registered for tool: list_threads.- One duplicate/orphan worker remains recorded and should not be used.
- The manager can only coordinate by known direct thread IDs, not by title/search discovery.
Expected behavior
Thread tools should have reliable, internally consistent behavior:
- If a thread-management tool is exposed in the tool surface, the backend handler should be registered and callable.
- If
create_threadreturns an error, it should not also create a thread silently. - If thread creation is accepted but asynchronous, the result should return a pending ID/status or a durable operation ID that can be checked.
- A worker thread created from a valid prompt should not enter
systemErrorbefore it can acknowledge the prompt. list_threadsand directread_threadshould not disagree about the existence/reachability of freshly created child threads.send_message_to_threadshould not report handler failure after actually delivering a message, or should return an explicit uncertain/pending status.
Impact
This breaks manager/worker workflows in Codex Desktop:
- Managers cannot safely deduplicate workers before creation.
- Retrying after a false
create_threaderror can create duplicate/orphan worker threads. - Workers may exist but be invisible to
list_threads. - Direct IDs become the only safe control path.
- Durable external logs are required to avoid losing track of created workers.
- It is hard for users to know whether a thread action failed, succeeded, or succeeded after reporting failure.
Workaround used
I added a local delayed-verification workflow:
- After
create_threadreturns an error or no ID, wait briefly. - Retry a narrow
list_threadsquery if available. - If
list_threadsis unavailable, search recent local rollout/session records for unique title/prompt phrases. - Only mark a worker canonical after direct
read_threadverifies the thread, cwd, and prompt. - Record duplicates/orphans separately.
- Avoid creating replacement workers while canonical direct-ID reads work.
This is only a workaround. It cannot fix the underlying handler-registration/runtime inconsistency.
Requested fix
Please harden Codex Desktop thread-control semantics so that:
- advertised thread tools are backed by live handlers;
create_threadis atomic or returns a durable pending operation;- handler failures cannot mask successful creation;
list_threadscan discover threads that directread_threadcan read;- newly created worker threads reliably initialize rather than becoming
systemErroruntil manually opened/prompted; send_message_to_threadhas explicit delivered / not delivered / uncertain status semantics.
Local evidence retained
I recorded the incident locally in these workspace logs:
wiki/logs/2026-07-05-hydroscope2-blind-create-fallback.mdwiki/logs/2026-07-05-hydroscope2-worker-recovery-attempt.mdwiki/logs/2026-07-05-hydroscope2-manual-worker-prompt-readback.mdwiki/logs/2026-07-05-hydroscope2-chief-rereview-manual-workers.mdwiki/outputs/hydroscope-like-groundwater-workbench-plan-2026-07-04/hydroscope-2-manager-dashboard.md
I can provide more exact thread IDs/timestamps if useful, but I have kept this report focused on the behavior rather than workspace-specific content.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗