Repository navigation
Description
Motivation
Support user-authorized handoffs to an already-open Codex /btw / /side conversation without delivering to or disrupting its parent thread.
Current discovery reads saved threads from state_5.sqlite, and sending requires a saved destination before invoking codex queue. A side conversation is an ephemeral, in-memory fork, so this path does not support it. This is a proposed optional integration, not a regression in ordinary saved-thread delivery.
Evidence and current limits
Read-only technical review against session-peer main 90489fccc87fe2588a2546aaaf7f285429d2bcfd and installed Codex CLI 0.159.2 / upstream tag commit ff6aec96948b70d94983af2641a6b67c94faeff5:
- session-peer discovery and queue submission: saved-thread discovery and preflight precede native queue submission.
- Official slash-command documentation:
/btw//sideopens an ephemeral fork with a separate transcript. - Native queue processor:
require_thread()explicitly rejects queued submissions for an ephemeral thread. - Official App Server documentation:
thread/loaded/list, metadata-onlythread/read,turn/start, andturn/steerprovide candidate building blocks. - Native side lifecycle: the fork is ephemeral and has an explicit side-conversation boundary.
An adapter must reach the existing owning app server. A new unrelated app-server process cannot discover another process's in-memory fork. Host applications that expose no suitable endpoint may remain unsupported. Actual side-session delivery and ACK are not yet tested.
Alternatives considered
- Removing the saved-thread check alone: insufficient; native queue also rejects ephemeral destinations.
codex exec resumeor the existing wake path: not a way to recover an unsaved side conversation, and must not create an extra prompt or replacement fork.- Ordinary persisted
/fork: useful existing alternative, but not equivalent to the lightweight lifetime of/btw. - Automatically redirecting to the parent, injecting terminal keystrokes, or writing internal DB/queue files: excluded.
Proposed behaviour
Investigate an experimental, explicit opt-in live-app-server adapter while retaining the existing queue path for ordinary destinations.
- Operator-controlled endpoint selection, exact live thread ID and version/capability validation; never accept arbitrary endpoints from an untrusted peer message.
- Discover loaded ephemeral threads through the owning server. Do not assume every ephemeral fork is a
/btwsession; establish reliable side/parent identification or require explicit selection. - Metadata-only reads: no transcript export or accidental persistence of inherited side-chat history.
- Send one user input through the existing thread's supported native API, with no permission/config overrides. Idle delivery and explicitly requested steering are separate operations; busy targets fail closed by default.
- Closing, server disconnection, or ambiguous ownership produces a structured refusal. No automatic parent fallback, recreation, wake, or resend.
- Preserve sender/Reply-To semantics where support can be established. Return acceptance separately from consumption/ACK.
CLI flags and endpoint configuration remain design decisions, not established contracts.
Acceptance criteria
- Demonstrate discovery and exact destination selection on a supported existing server, including reliable distinction from unrelated ephemeral forks.
- Use an isolated, user-authorized parent + side conversation to verify one request and explicit reply/ACK; confirm no message was delivered to the parent and its task was not interrupted.
- Cover missing endpoint, incompatible server, wrong home/server, busy thread, closed thread, ambiguous selection, and closure between preflight and delivery.
- Preserve native approvals and side-conversation instructions; never auto-answer approvals, launch a replacement writer, or modify trust/sandbox settings.
- Keep existing local/SSH saved-thread delivery unchanged; test any supported SSH adapter separately, with bounded cleanup and no secret endpoint/auth data in output.
- Document ephemeral lifetime, unsupported host-app configurations, privacy, supported Codex versions, and submitted != consumed/completed.
- Do not claim support or publish the feature until real roundtrip evidence and compatibility tests pass.
Milestone: v1.1.0, a minor-version opt-in capability candidate. Assignment is not implementation, deployment, or release approval. No implementation is requested by this issue-registration task.
Activity