Repository navigation
Description
Environment
- ChatGPT/Codex Desktop:
26.818.21641(build6849) - macOS
26.6.2(build25G83) - Process architecture:
x86_64 - Naturally scheduled local automation
- Observed: 2026-08-20
Private project IDs, conversation IDs, account details, and local paths are intentionally omitted.
Summary
The app-facing list_threads tool cannot support correctness-sensitive project reconciliation because its surfaced schema exposes only a fixed result limit:
declare const tools: {
codex_app__list_threads(args: {
limit?: number;
}): Promise<unknown>;
};It has no exact-project filter, page cursor, terminal completeness signal, or durable incremental checkpoint.
This is independently blocked by the scheduled-run hang in #35030, but even after that hang is fixed, a successful fixed-limit response cannot establish that all conversations in one ChatGPT Project were enumerated.
Reproduction
- Create a naturally scheduled automation that needs to inspect conversations belonging to one ChatGPT Project.
- Inspect the exposed
list_threadsschema. Onlylimitis available. - Attempt a bounded call. In the latest run,
list_threads({limit: 50})remained pending through four bounded waits and had to be terminated. - Reduce the limit or run interactively. A returned recent-task window still cannot be paged, filtered server-side to the exact project, or proven complete.
- Try to resume later from a durable cursor. No cursor or changed-since checkpoint is exposed.
Expected behavior
Provide a bounded, project-scoped enumeration contract suitable for scheduled automation. One possible shape is:
list_threads({
projectId?: string,
limit?: number,
cursor?: string,
changedSinceCursor?: string
}) => {
threads: ThreadSummary[],
nextCursor?: string,
complete: boolean,
checkpointCursor?: string
}Required semantics:
- Prefer server-side filtering by exact ChatGPT Project ID.
- Support small bounded pages with an opaque continuation cursor.
- Return an explicit terminal/completeness indicator.
- Preserve stable conversation IDs, exact project ID, kind, and update timestamp.
- After a complete bootstrap, expose a durable cursor/checkpoint that returns only new or changed conversations.
- On timeout or partial failure, return a structured error without implying an empty or complete result.
Names are illustrative; equivalent semantics would solve the problem.
Actual behavior
- The tool schema exposes only
limit. - Results are a recency-bounded mixed inventory rather than a provably complete project inventory.
- There is no cursor for older pages.
- There is no durable incremental cursor.
- In natural scheduled runs, the call can also remain pending, as tracked in Scheduled Codex Desktop runs hang on
list_threadswhile interactive calls succeed #35030.
Impact
A safety-conscious automation must fail closed:
- It cannot infer “no new conversations” from a timeout or partial recent window.
- It cannot advance a source checkpoint.
- It cannot claim source parity or completeness.
- It must remain paused even when repository identity and read/write capability are independently verified.
This blocks reliable, low-noise scheduled reconciliation of ChatGPT Project conversations without resorting to unsupported local database access or UI scraping.
Related issues
- Scheduled Codex Desktop runs hang on
list_threadswhile interactive calls succeed #35030 — scheduledlist_threadscalls hang while interactive calls succeed. - [Desktop 26.721.4979.0] list_threads schema advertises query but runtime rejects it as unrecognized #35377 — surfaced
querysupport can disagree with the runtime validator. - Codex Desktop Projects sidebar shows "No chats" for projects with older non-archived conversations #25500 — project views can incorrectly imply no chats when older conversations fall outside the recent set.
Activity
FaxanFM commentedon Aug 30, 2026
+1 — this contract gap is currently a hard release blocker for a published Codex plugin, and I want to add a concrete second use case plus a note on how small the code change appears to be.
Use case
I maintain Chronos, an open-source supervision plugin for Codex. Its Governor is one host-managed recurring task that reconciles the liveness of every local Codex task: it must account for itself exactly once, close tasks that no longer exist, and prove topology convergence before it enables its own recurrence. All of that depends on one primitive the host does not currently provide: a provably complete enumeration of local tasks.
The current in-conversation
list_threadstool cannot supply it:MAX_LIST_LIMIT), default 10."list_threads does not accept a cursor". Onlylist_archived_threadsaccepts one.{schemaVersion, untrustedDataNotice, pinnedThreads, threads, unavailableHosts, unavailableSources}— nonextCursor, nocompleteflag, no total count, no snapshot identity.search_term,cwd,project_id, andsource_kindsare fixed by the wrapper), so the space cannot be partitioned into provably covered sub-queries either.A response of fewer than
limititems still proves nothing, because there is no documented completeness semantic to rely on. Repeated calls return the same recency window. Lifecycle hooks cannot close the gap — they are optional hints and cannot establish absence.Consequence
Because no sequence of
list_threadscalls can distinguish "these are all the tasks" from "these are the 50 most recently updated tasks," a safety-conscious automation has to fail closed. Chronos v0.9.2 now detects this contract and returns an explicit capability blocker (host_inventory_completeness_unsupported), refuses to claim a Governor, refuses partial reconciliation, and leaves zero recurrences. The supervision feature is therefore fully disabled on current Codex hosts — not because enumeration is expensive, but because completeness cannot be proven. Observed on Windows 11; the same wrapper code applies on all platforms.We deliberately rejected the available workarounds as non-authoritative:
CODEX_HOME(sessions / state database) directly — internal, unversioned schema.The fix appears to be very shallow
Looking at
codex-rs/tui/src/dynamic_tools.rson currentmain, the plumbing already exists end to end:arguments.cursorintoThreadListParams { cursor: arguments.cursor.clone(), ... }for both tools; only an explicit guard blocks it for the non-archived case.thread/listpath (thread store + app-server) fully supports anchor cursors (timestamp|thread_id) with terminalnext_cursor: Nonesemantics today, andlist_archived_threadsalready exposes exactly this through the same wrapper.response.next_cursorand drops it when building the response JSON.So the minimal change is: remove the cursor-rejection guard for
list_threadsand includenextCursorin the non-archived response — mirroring whatlist_archived_threadsalready does.What automations need (minimal ask)
cursoraccepted onlist_threads, withnextCursorreturned and a documented guarantee that a null/absentnextCursoris terminal.CreatedAt-ascending anchor-cursor pagination, so items created before enumeration began cannot be skipped. A response-levelcomplete: booleanor a stable snapshot ID would be even better, but terminal cursor semantics under a documented sort would already be sufficient.list_threadswhile interactive calls succeed #35030).The
complete/checkpointCursorshape proposed in the issue description would cover all of this and more; I'd happily take the two-line version first.Happy to run a Windows canary against a build with the expanded contract — Chronos already has a capability preflight (
complete_flag/cursor_snapshot/total_count_snapshot) wired to detect and use exactly these semantics, so we can validate end to end quickly.TA-matrix-coder commentedon Sep 2, 2026
There is now a useful distinction between the upstream App Server capability and the installed Desktop wrapper surface.
At upstream HEAD
eb10d91e48ccbd0930427461fb392337addb1ac0, the experimental App Serverthread/listpath already supportsprojectId, and that filter is applied before cursor handling andLIMIT. This ordering is necessary, but it is not sufficient for a deterministic project-scoped observer when threads can be created concurrently.However, the installed Codex Desktop
codex_app.list_threadssurface inspected locally exposes onlylimit. In a bounded observation,list_threads(limit=50)omitted an existing project task, whileread_threadretrieved the same task when its ID was already known. Consequently, the current wrapper cannot discover and bind such a task deterministically within a project-scoped observation.Please expose enough of the App Server contract through the Desktop wrapper to make discovery deterministic:
projectIdplus host identity, or an equivalently canonicalcwdscope;cursorand an explicit completeness/exhaustion signal;sourceKinds;createdAtordering;createdAt;useStateDbOnlywhere supported.title/searchTermis useful only as a confirmation predicate, not as the primary identity or completeness mechanism, because title hydration may occur after initial allocation.A focused regression test would interleave threads from two projects, request the target project with
limit=1, create additional target-project threads while walking the result set, and prove against one declared snapshot/as-of watermark that: (a) no other-project thread is returned, (b) every target-project thread in that snapshot is returned exactly once, without skips or duplicates, (c)createdAtordering is stable, and (d) the terminal response explicitly proves exhaustion of that snapshot. The same test should run through the Desktop wrapper, not only against the raw App Server method.KaliGi commentedon Sep 7, 2026
Additional interactive macOS reproduction on 2026-09-07:
codex_app__list_threads({limit: 200})is rejected withlimit: Too big: expected number to be <=50.For cross-task messaging, either cursor pagination with explicit terminal completeness or an exact-title lookup returning every accessible match plus
completeScope: trueand unavailable-host/source state would solve the identity half. An atomic exact-title send/enqueue operation with the same fail-closed zero/duplicate/unavailable-scope semantics would also work. No thread IDs, task titles, account details, or local paths are included here.nexus-ai-2045 commentedon Sep 23, 2026
We reproduced this limitation during an interactive Codex Desktop session on Windows, outside a scheduled automation.
Observed behavior
list_threadstool exposed only alimitargument (maximum 50), with no project filter or pagination cursor.read_threadreturned metadata for all 10.This is a discoverability gap: conversations accessible by ID cannot be reliably enumerated through the agent-facing project workflow. We are not reporting data loss.
Expected behavior
Please expose:
Increasing the fixed limit alone would not guarantee completeness.
Related reports
These reports appear related, but we have not established that they share the same underlying cause.
This was observed while using Codex Desktop for project coordination at Nexus. Private conversation IDs, titles, paths, and screenshots are intentionally omitted.
If the Desktop-facing
list_threadsimplementation is available in this repository, we would be interested in contributing a focused PR for pagination and project-membership filtering. Could you point us to the relevant implementation or confirm whether external contributions are possible?mickitty0511 commentedon Oct 26, 2026
Adding a Codex task-management use case to this request rather than opening a duplicate.
Please allow the agent-facing
list_threadstool to:The result limit should apply after the type and archive filters, so unrelated recent chats cannot displace matching tasks. Cursor pagination with a documented completion signal is fine; raising a fixed recent-result limit does not guarantee full enumeration. Pinned threads should be included exactly once, and unavailable hosts/sources should be reported so a partial result cannot be mistaken for a complete inventory.
The schema currently exposed to this Codex session still accepts only
limit?: number. A useful acceptance case is a profile with ordinary chats, archived tasks, and more unarchived tasks than fit on one page: walking all pages must return every matching unarchived non-Chat task exactly once, with no ordinary chats or archived tasks.