Skip to content

Attribute native Codex conversation switches to the mapped launch - #35

Open
penguinboi wants to merge 3 commits into
leofmarciano:mainfrom
penguinboi:fix/codex-launch-attribution
Open

penguinboi wants to merge 3 commits into
leofmarciano:mainfrom
penguinboi:fix/codex-launch-attribution

Conversation

@penguinboi

Copy link
Copy Markdown

Activity in another Codex tab changes a sibling thread's timestamp. The workspace snapshot guard then treats that activity as a switch by the mapped CLI and blocks capture or return to Claude.

Route each native daemon launch on Unix through a private local connection and persist successful conversation selections in the existing launch journal. Capture and recovery validate that evidence against the mapped thread. Sibling activity from other connections no longer causes rejection. Native /new, /fork, and /resume to another thread remain detectable, including switching away and back. Incomplete evidence blocks automatic capture.

The evidence stores thread IDs and completion state. Ephemeral background title generation is excluded only when both ephemeral: true and threadSource: "thread_title" are present. Launches without a native daemon connection retain the existing conservative snapshot check. No database migration is required. Reopen exited sessions through agentctl open codex --session NAME because the local relay endpoint lasts for one launch.

Depends on #34 for the shared native daemon transport. This PR currently includes its two prerequisite commits. Review the attribution change separately in the incremental diff. Merge #34 first; this branch can then be updated to remove the prerequisite commits from the PR diff.

Validation:

  • TDD regressions cover selection attribution, incomplete evidence, title generation, request-ID collisions, and durable evidence after reopening the journal.
  • Real native CLI E2E allowed a sibling model turn that advanced its timestamp. Native /new, /resume to an existing thread, and /fork were rejected at exit and again during reconciliation.
  • A real three-model-turn Claude → Codex → Claude round trip passed with recall in both directions, all launches captured, one mapped conversation in completed Codex evidence, and two immediate successful syncs.
  • Full workspace tests, all five Codex provider live probes, CLI capture and relay persistence live probes, clippy with warnings denied, formatting, and docs passed. Dependency versions are unchanged from Fix native Codex handoffs with shared daemon writer ownership #34.

Live validation used macOS arm64, Codex 0.159.2, and Claude 2.1.286. The attribution change applies to native daemon launches on Unix. Previously journaled launches without evidence retain their existing validation behavior.

Fixes #32.

Use thread/read directly during post-launch capture and reconciliation.
Retain terminal-turn, workspace, and session identity checks before import.
Add real installed-Codex regressions for reader and canonical capture paths.
Connect native interactive preparation and projection to the running Codex
daemon so detached threads retain one writer. Validate its socket and version,
and close only the bridge connection on shutdown. Keep standalone control
connections process-owned.

Check sync response errors in the native smoke and accept Claude screen-reader
trust prompts. Real native-owner probes and a three-turn conversational round
trip verify capture and context recall in both directions.
Route native daemon launches through a private local connection and persist
successful thread selections before delivering their responses. Validate the
saved evidence during capture and recovery so unrelated sibling activity
does not look like a native conversation switch.

Exclude ephemeral title generation from conversation selection. Keep detection
of native new, fork, and resume escapes, and block incomplete evidence. Retain
the existing conservative check for launches without a relay.

Verify durable evidence, real sibling activity, native escape recovery, and
conversational context recall in both directions.
@penguinboi
penguinboi force-pushed the fix/codex-launch-attribution branch from 566456b to 90a7c28 Compare September 30, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Existing sibling thread updates falsely block Codex provider handoff

1 participant