Repository navigation
Accept a caller-chosen thread id on thread start - #24
Conversation
Vogt needs to hibernate and resume a Codex session under the engine's own id. thread/start takes an experimental threadId, and the TUI and exec expose it as --session-id. A duplicate, an invalid UUID, or an ephemeral thread is rejected. Core already honours reserved_thread_id, so the rollout path is keyed by the caller's id without a core change.
|
Review of head b76278c (no merge, no push). Caller thread id is wired the way the brief asks. Non-blocking: the store-error check is an exact string match (same pattern already used in this file); no separate v4 unit test beyond the honors case; no generated schema artifact in the diff. no blockers (head b76278c) |
A global flag bound the positional SESSION_ID on resume and fork, so those commands rejected a caller id they never received. Leave the flag on the root exec command only, and refresh the experimental protocol export for threadId.
|
Reviewed head 98c54e5 (12 files, against fork/main) from a detached worktree, not the shared checkout. The latest commit does what it says. On the server, a caller id is parsed with v4 degrades. The rollout directory and filename timestamp come from local time in the recorder, not from the UUID, and No defect that would break real use of a caller-chosen thread id. no blockers (head 98c54e5) |
Summary
thread/startaccepts an experimentalthreadId(any UUID version). The server rejects a duplicate, an invalid id, and a caller id on an ephemeral thread, then passes the id through the existingreserved_thread_idpath so the rollout is keyed by it. No core change.codex execexpose the same choice as public--session-id. It is refused with resume, fork, and ephemeral sessions.InvalidRequest("no rollout found for thread id …"), notThreadNotFound; that case is treated as absent. Resume of a brand-new thread is not asserted, because a fresh thread is not materialized until the first user message.Test plan
cargo test -p codex-app-server --test all thread_start_— 56 passed, including honor, invalid id, and ephemeral rejectioncargo check -p codex-tui -p codex-exec