Skip to content

Refresh MCP runtimes across thread startup#35204

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/8944f5a21816a1405e038a0d4c08b66362ea9368
Jul 24, 2026
Merged

Refresh MCP runtimes across thread startup#35204
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/8944f5a21816a1405e038a0d4c08b66362ea9368

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 24, 2026

Copy link
Copy Markdown

Refresh MCP runtimes across thread startup

Why

MCP configuration can change while a thread is still starting, before it appears in the thread manager's loaded-thread list. In that window, invalidation could miss the new thread and leave it with a stale MCP runtime.

What changed

  • Centralize MCP runtime invalidation in ThreadManager so it refreshes loaded threads and marks in-progress thread startups for refresh after publication.
  • Use the centralized invalidation path for account and plugin changes.
  • Invalidate MCP runtimes after successful server and plugin OAuth logins.

Testing

  • Add a regression test that pauses thread startup, invalidates MCP runtimes, and verifies that the newly published thread refreshes its MCP projection.

## Why

MCP configuration can change while a thread is still starting, before it appears in the thread manager's loaded-thread list. In that window, invalidation could miss the new thread and leave it with a stale MCP runtime.

## What changed

- Centralize MCP runtime invalidation in `ThreadManager` so it refreshes loaded threads and marks in-progress thread startups for refresh after publication.
- Use the centralized invalidation path for account and plugin changes.
- Invalidate MCP runtimes after successful server and plugin OAuth logins.

## Testing

- Add a regression test that pauses thread startup, invalidates MCP runtimes, and verifies that the newly published thread refreshes its MCP projection.

GitOrigin-RevId: 8944f5a21816a1405e038a0d4c08b66362ea9368
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/8944f5a21816a1405e038a0d4c08b66362ea9368 branch from 87b56d6 to 3645a43 Compare July 24, 2026 15:07
@copyberry
copyberry Bot merged commit 3645a43 into main Jul 24, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/8944f5a21816a1405e038a0d4c08b66362ea9368 branch July 24, 2026 15:08
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant