Skip to content

Fix Codex memory worker session ownership - #20849

Merged
austinywang merged 2 commits into
mainfrom
fix/20739-codex-memory-session
Oct 17, 2026
Merged

austinywang merged 2 commits into
mainfrom
fix/20739-codex-memory-session

Conversation

@austinywang

@austinywang austinywang commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #20739. Codex's internal memory-consolidation worker can run hooks from ~/.codex/memories without a durable transcript while sharing the visible Codex process. cmux now drops those internal or explicitly marked subagent hook events before they can create a session record or replace the foreground surface's resume binding. The regression test keeps the user's binding in place when the memory worker starts.

Testing

  • Added CodexTurnCompletionOwnershipTests.internalMemorySessionCannotReplaceForegroundResumeBinding.
  • python3 scripts/verify-local.py — passed localization-defaults, test-wiring, and feature-flags; Swift syntax was unsupported because swiftc is not installed.
  • ./scripts/test-unit.sh -only-testing:cmuxTests/CodexTurnCompletionOwnershipTests test — unavailable locally because xcodebuild is not installed in this environment.
  • Hosted glaeda-gh wait pr manaflow-ai/cmux#20849 --until green — completed successfully; macOS compile admission, CLI product tests, and all three CLI regression shards passed.

The regression test is committed before the fix in 06200474; the fix is 76f4dd4e.

Changelog

Fixed: Codex memory-consolidation sessions no longer replace the foreground tab's resume session

Proof

Hosted macOS app-host execution completed successfully; no screenshot is applicable.

Checklist

  • Behavior changes have added or updated tests, or Testing says why not
  • UI, settings, menu, schema, help-text or user-facing docs change: no localization changes
  • User-facing docs updated if needed: none needed
  • Reviewed with a subagent before merge; not applicable until merge review

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 285359ac-6498-42b1-8f78-c5a449a00f93
📥 Commits

Reviewing files that changed from the base of the PR and between 9d01f95 and 76f4dd4.

📒 Files selected for processing: 3
  • CLI/CMUXCLI+AgentHookPayload.swift
  • CLI/cmux.swift
  • cmuxTests/CodexTurnCompletionOwnershipTests.swift
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@austinywang
austinywang force-pushed the fix/20739-codex-memory-session branch from 9031b93 to 76f4dd4 Compare October 15, 2026 01:20
@austinywang
austinywang merged commit 44f0f44 into main Oct 17, 2026
74 checks passed
@austinywang
austinywang deleted the fix/20739-codex-memory-session branch October 17, 2026 03:37
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for 76f4dd4e2d: every check was green at merge (18 verified; 18 skipped by policy). Full suite runs on main after merge.

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.

Codex: background memory-consolidation session replaces the tab's session, so Cmd+Shift+T can't resume Codex

1 participant