Skip to content

fix(codex): keep fork and delete state consistent - #34

Merged
muggle-stack merged 4 commits into
muggle-stack:masterfrom
TroyMitchell911:fix/codex-fork-delete-consistency
Aug 14, 2026
Merged

fix(codex): keep fork and delete state consistent#34
muggle-stack merged 4 commits into
muggle-stack:masterfrom
TroyMitchell911:fix/codex-fork-delete-consistency

Conversation

@TroyMitchell911

@TroyMitchell911 TroyMitchell911 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix two consistency failures in Codex session lifecycle handling:

  • A successful fork could make the browser focus an unrelated session.
  • A loaded shared-daemon session could fail deletion with an active-writer
    error.

Root cause

Fork completion published SessionForked and then reused a cached session
catalog that did not contain the new child. The browser correctly treated the
missing focused child as stale and selected another session. A later fork could
therefore use that unrelated session as its parent.

A successful zero-turn fork can also remain absent from thread/list until
its first model turn. Without a durable catalog overlay, a later refresh loses
the child again, and a rename only updates app-server state that is still
missing from the list.

Deletion disconnected the cc-remote daemon proxy before issuing
thread/delete through a separate app-server process. Disconnecting the proxy
does not release the shared daemon's writer, so the second process rejected the
delete.

Changes

  • Invalidate the Codex catalog before publishing same-directory and worktree
    fork results.
  • Recover completed zero-turn forks from the durable journal while a verified
    active or archived rollout still exists.
  • Preserve journaled fork titles across catalog refreshes until the native list
    indexes the child.
  • Stop overlaying a fork as soon as its rollout is removed, so deletion cannot
    resurrect a catalog-only child.
  • Issue thread/delete through the app-server connection that owns a resident
    thread.
  • Delete cold Code sessions through a transient shared-daemon control
    connection without consuming or evicting a resident pool slot, with a
    loaded stdio fallback when the shared proxy is unavailable.
  • Arm control-only mode before its reader starts and ignore unrelated
    shared-daemon lifecycle notifications so sibling threads cannot bind it.
  • Leave shared-daemon server requests unanswered on control-only connections
    so transient deletion cannot reject a sibling thread approval.
  • Exclude transient cold-delete control proxies from watched and unwatched
    ownership scans using their exact PID and process start time.
  • Preserve holderless private-App activity during cold ownership probes so
    deletion fails closed until a terminal marker or normal stale-owner cleanup.
  • Keep cold ownership probes out of the persistent watch and sidebar state.
  • Preserve resident and private metadata when app-server rejects deletion.
  • Reconcile uncertain outcomes with exact thread/read and rollout checks
    instead of a bounded session-list scan.
  • Enumerate native catalog and watch-only descendants before recursive
    deletion, verify exact ancestry, and reject active cold descendants.
  • Clean cold-root checkpoints by session identity rather than the fallback cwd
    used only for its transient control connection.
  • Reject a cold root reported active by the native catalog even when its
    rollout is missing or unreadable.
  • Fail closed when a resident ownership watch cannot be registered,
    disappears, or cannot complete its holder scan.
  • Detect capped native delete notifications and reconcile the complete
    preflight descendant set with exact reads.
  • Include confirmed cold descendants in shared metadata cleanup and remove
    checkpoint journals across their former repositories.
  • Lock and preflight resident fork descendants before recursive deletion so
    wrapper-owned queued prompts cannot be discarded.
  • Refresh ownership for the requested thread and each resident descendant,
    rejecting active private-App and shared-daemon CLI turns before deletion.
  • Collect the complete bounded thread/deleted batch even when the requested
    root notification arrives before descendant notifications.
  • Force-clean persisted checkpoint journals after confirmed Code deletions,
    including resident descendants and cold sessions.
  • Handle verified descendant deletion, multi-profile wire IDs, queued work,
    spontaneous turns, and preflight races consistently.
  • Reconcile resident Codex identities by both browser route and native thread
    ID so recursively deleted private /btw forks are evicted exactly once.
  • Ignore exact missing-thread ancestry failures from stale watch-only entries while
    preserving fail-closed behavior for every other app-server rejection.
  • Return both route and native identities for deleted resident descendants so
    controls, plans, presentation, pins, watches, and focus are cleaned atomically.
  • Hold resident query and queue locks through exact delete reconciliation and
    pool removal, then reject commands that captured a now-detached context.
  • Clean unopened resident checkpoint journals by session identity across former
    repositories instead of deriving a bucket from a fallback cwd.
  • Treat idle resident /btw descendants as wrapper-owned after their locked busy
    preflight instead of requiring a nonexistent rollout ownership watch.
  • Contain checkpoint filesystem cleanup failures after native deletion so
    metadata cleanup and list refresh still complete.
  • Make existing interaction tests deterministic under provider overrides,
    mobile WebKit virtual-row layouts, Chromium wheel-lease timing, and loaded
    host drag cost.

Regression coverage

The new tests cover:

  • Parent-only fork caches for both fork variants.
  • Completed zero-turn forks that remain absent from the native list.
  • Rename persistence while a fork is supplied by the journal overlay.
  • Active and archived rollout discovery without resurrecting a deleted fork.
  • Resident and cold shared-daemon deletion, including a full resident pool
    and the unavailable-proxy stdio fallback.
  • Cold deletion without persistent watch or sidebar mutation.
  • Control-only deletion while sibling thread notifications and approval
    requests arrive during and after initialization.
  • Holderless private-App activity during a cold deletion probe.
  • Code and Work sessions.
  • Explicit rejection and uncertain transport outcomes.
  • Busy state changes during ownership preflight.
  • Multi-profile ID translation.
  • A transient multi-profile delete proxy with unavailable structured logs,
    both with and without an existing watch.
  • Recursive deletion notifications, including root-first and interleaved
    descendant ordering.
  • Active cold descendants found only in the native catalog or watch state,
    plus active and archived catalog pagination.
  • Cold-root checkpoint cleanup after its native cwd has disappeared.
  • Active cold-root rejection when no usable rollout evidence exists.
  • Missing rollout watches, saturated watch capacity, and incomplete ownership
    scans during resident deletion.
  • Notification overflow with descendants omitted from the native event batch.
  • Complete cold-descendant metadata cleanup and cross-repository checkpoint
    journal removal.
  • Rejection when a resident descendant has queued work or an external owner.
  • Recursive deletion of a resident /btw descendant reported by native ID,
    including cleanup of every route-keyed metadata store.
  • A stale watch-only thread absent from the loaded app-server catalog does not
    block deletion of an unrelated root.
  • Immediate, queued, and replacement queries racing root or descendant delete
    reconciliation are rejected explicitly without retaining or dropping payloads.
  • A resumed resident child whose original cwd was removed still deletes its
    persisted checkpoint bucket from the former repository.
  • An idle resident /btw descendant is deleted with its parent without probing
    an external owner under the native thread id.
  • A resident descendant journal raising OSError after native deletion cannot
    interrupt shared metadata cleanup or session-list refresh.
  • Active shared-daemon CLI ownership on the requested root thread.
  • Persisted checkpoint cleanup for cold and resident descendant sessions.

Validation

  • .venv/bin/python -m pytest: 1815 passed, 2 skipped
  • ruff check cc_remote tests deploy
  • npm --prefix web run build
  • npm --prefix web run test:reliability
  • npm --prefix web run test:history-browser: 222 passed, 20 skipped
  • npm --prefix web run lint
  • bash -n for deployment scripts
  • shellcheck -x for deployment scripts
  • git diff --check

All commits are GPG-signed, and all added source lines stay within 80 columns.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 21082a7240

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py Outdated
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from 21082a7 to 300bf50 Compare August 12, 2026 11:14
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 300bf50a19

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py Outdated
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from 300bf50 to 3497ac9 Compare August 12, 2026 11:50
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3497ac93a9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from 3497ac9 to 6f1eb1a Compare August 12, 2026 12:19
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f1eb1a956

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from 6f1eb1a to a622fe3 Compare August 12, 2026 12:48
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a622fe3949

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from a622fe3 to ae28404 Compare August 12, 2026 13:17
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae28404703

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py Outdated
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from ae28404 to 91f6305 Compare August 12, 2026 13:37
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91f6305103

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from 91f6305 to 251a980 Compare August 12, 2026 13:57
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 251a98055d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from 251a980 to a21d1a4 Compare August 12, 2026 14:14
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a21d1a4e22

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/codex_handle.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from a21d1a4 to 3f0bc5c Compare August 12, 2026 14:32
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3f0bc5c1d6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from 3f0bc5c to eecebb5 Compare August 12, 2026 14:49
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fbfb18389e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from fbfb183 to a46031a Compare August 12, 2026 18:01
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a46031a49a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py Outdated
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from a46031a to 877b03a Compare August 12, 2026 18:27
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 877b03a56b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from 877b03a to 2cea47c Compare August 12, 2026 18:54
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2cea47c9e5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py Outdated
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from 2cea47c to 1e98846 Compare August 12, 2026 19:18
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1e9884686c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from 1e98846 to f1430f9 Compare August 12, 2026 19:37
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1430f97ae

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from f1430f9 to b760136 Compare August 12, 2026 19:56
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b760136cec

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cc_remote/wrapper/machine.py
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from b760136 to b1e7322 Compare August 12, 2026 20:12
@TroyMitchell911

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: b1e7322df5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

- Invalidate stale catalogs before publishing both fork variants.
- Recover journaled fork-only threads until native list indexes a turn.
- Preserve rename titles while those threads remain catalog-only.
- Ignore deleted fork records whose rollout no longer exists.
- Route resident deletion through the app-server that owns the thread.
- Keep cold deletion outside the pool with a transient control connection.
- Preserve state on rejection and reconcile unknown outcomes exactly.
- Cover Code, Work, multi-profile, busy, and descendant deletion paths.
- Clear provider model overrides in curated-default regressions.
- Ignore host managed settings so local and CI results stay deterministic.
- Pair wheel availability changes atomically to preserve gesture intent.
- Bound the native selection drag workload without weakening assertions.
- Dispatch the follow-up pointer-style click on the target DOM node.
- Keep virtual-row geometry outside the interaction-state regression.
@TroyMitchell911
TroyMitchell911 force-pushed the fix/codex-fork-delete-consistency branch from b1e7322 to 9ecd740 Compare August 13, 2026 03:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ecd74022f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if engine == "claude":
await self._delete_claude_client_message_ids(sid)
else:
await self._delete_codex_client_message_ids(codex_alias_path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Purge aliases for every recursively deleted rollout

When deleting a parent with fork descendants, deleted_sids includes the recursively removed children, but this call deletes client-message aliases only for the root's codex_alias_path. Any descendant previously used through Remote has its own CodexClientMessageStore record; after thread/delete removes its rollout, that path can no longer be rediscovered, so the stale record remains in the bounded store and can prematurely evict aliases for live sessions, breaking stable client message IDs in history. Capture descendant rollout paths during preflight and delete each confirmed descendant's aliases as well.

Useful? React with 👍 / 👎.

@muggle-stack
muggle-stack merged commit a102d02 into muggle-stack:master Aug 14, 2026
3 checks passed
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.

2 participants