Refresh managed MCP requirements for active threads (#35213)

## Why

MCP config reloads updated resolved server and authentication values, but did not
carry managed server constraints or plugin requirements into active threads.

## What changed

- Refresh MCP state from the typed thread config, including its managed
  requirements, while retaining the thread's user layer and unrelated settings.
- Apply the refreshed config directly through `CodexThread` instead of encoding it
  as a protocol operation.
- Re-evaluate effective plugins immediately after account changes so their MCP
  requirements reach existing threads.

## Testing

- Cover replacement and enforcement of managed server and plugin requirements.
- Verify refreshed MCP settings are installed without changing the active model.

GitOrigin-RevId: 3cf0d69f51ef4893a4d722ee803fcbfdf1cd959e
This commit is contained in:
jif authored and copyberry committed 2026-07-24 16:35:43 +00:00
1 parent 000d2540ad
commit a177013eb0
7 files changed
+119 -97

No files matched your search

@@ -225,6 +225,10 @@ impl AccountRequestProcessor {
.await
{
Ok(config) => {
Self::spawn_effective_plugins_changed_task(
Arc::clone(thread_manager),
config_manager.clone(),
);
let refresh_thread_manager = Arc::clone(thread_manager);
let refresh_config_manager = config_manager.clone();
thread_manager