Skip to content

🤖 fix: inherit workspace MCP overrides in sub-agent and forked workspaces - #4130

Merged
ThomasK33 merged 1 commit into
mainfrom
mcp-server-gsaf
Sep 10, 2026
Merged

🤖 fix: inherit workspace MCP overrides in sub-agent and forked workspaces#4130
ThomasK33 merged 1 commit into
mainfrom
mcp-server-gsaf

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

A server that is disabled in global MCP config and enabled only for one workspace silently disappeared for every sub-agent (task) child and for forks of that workspace — and with it the tool_catalog_search tool, which is only created when MCP tools exist. Children now inherit the parent's per-workspace overrides, and forks snapshot them.

Background

Per-workspace MCP enables are stored in the gitignored <checkout>/.xum/mcp.local.jsonc. Sub-agent workspaces (TaskServicerunBackgroundInit) and workspace.fork create a fresh worktree from committed state, so that file never reaches them. The child's getOverridesForWorkspace returned {}, the global disabled: true won in applyServerOverrides, mcpTools was empty, TurnRequestBuilder never created toolSearchRuntime, and the model saw neither the MCP tools nor tool_catalog_search. Only isolation: "none" tasks (shared checkout) were unaffected.

The same-workspace path was verified to work in every variant tried (exec/plan/ask agents, untrusted project, disable→enable sequencing); the failure is specific to derived workspaces.

Implementation

  • WorkspaceMcpOverridesService.loadOverrides: when a workspace has no local file and no legacy config overrides, resolve through metadata.parentWorkspaceId (read-through, no copy, depth-bounded). Parent edits and plugin-uninstall prunes therefore apply to children on their next request. A child that saves its own overrides opts out; clearing them resumes inheriting. Lenient reads tolerate a removed/unreachable parent (send never fails); strict reads surface it.
  • WorkspaceService.fork: copyOverridesToForkedCheckout snapshots the source overrides into the new checkout (forks are independent workspaces, so no read-through link), placed before the existing plugin-override sanitization so stale plugin: enables are pruned exactly as for a tracked file. Best-effort; a failed copy never fails the fork. Shared-checkout (project-dir) forks are skipped.
  • Cache coherence for inheriting children: every save/prune publishes the written workspace's effective overrides and then re-publishes each descendant that inherits from it (transitively; a descendant with its own file cuts off its subtree). The publish callback now carries the target workspaceId. Every workspace on the same runtime identity whose canonical override path equals the written file (isolation: "none" tasks share the parent's checkout — in either direction) is treated as affected and re-published too, followed by its inheriting descendants. Sharers are matched on filesystem identity (host / SSH host / devcontainer config; never Docker) with realpath-canonicalized paths on the host, not on the whole runtime config or path spelling. Publication is authoritative-or-evict: a workspace whose effective state cannot be established (unreachable checkout) — and its entire inheriting subtree — gets publish(null), which MCPServerManager.forgetWorkspaceOverrides turns into an eviction of both the overlay cache and the recorded request options (the next serve of any kind, including prompt paths, re-reads disk) rather than a cached guess; a non-authoritative disk re-read (indeterminate probe, read or parse failure) keeps that invalidation alive — invalidations are generation-tracked so a forget landing mid-read is never retired by the older result — and the workspace fails closed (no MCP servers) until disk answers authoritatively. Resolution runs on already-loaded metadata (one config scan per save) and probes an ancestor's candidate paths in parallel. Clearing a child's own overrides publishes its inherited state instead of {}, so MCPServerManager's latestWorkspaceOverrides never pins a child to stale enablement.
  • Positive-absence gate: the file probe is three-way (file / absent / indeterminate). Inheritance requires every candidate path to be positively absent (errno ENOENT/ENOTDIR, or stat(1)'s own no-such-file diagnostic line on exec-backed remote runtimes — transport noise such as OpenSSH's identity-file warning stays indeterminate); an indeterminate probe keeps the pre-existing "no overrides" behaviour so a hidden child disable can never be overridden by the parent's enable.
  • Fork copy details: the source's effective overrides are resolved first (performing the legacy config.json → file migration), the same-path skip applies only to local (project-dir) runtimes that genuinely share the checkout (Docker reports /src for every container), the copy runs before runBackgroundInit so the init hook sees the fork's initial configuration deterministically, and the raw document that actually supplied the overrides (the source's own, or the ancestor's when the source is an inheriting sub-agent) is copied whenever one exists — even if this build normalizes it to nothing — with only canonical plugin: keys stripped (the prune text transform was extracted from prunePluginOverrideKeys for this), so comments and forward-compatible fields survive per the upgrade↔downgrade rule while a fresh checkout never inherits a plugin enable it has no consent context for. Whatever survives pruning is scanned once more: any canonical plugin key in any decoded string of the parsed tree (including fields this build does not own; JSON escapes cannot slip past) refuses the copy. The write is refused when the target .xum/.xum/mcp.local.jsonc is a repo-controlled symlink or an already-tracked file (writes follow links on every runtime, so a tracked link could redirect the copy outside the checkout).
  • The WorkspaceService overrides port is now a Pick<WorkspaceMcpOverridesService, ...> instead of an ad-hoc interface.
  • Reconciled with the batched plugin-override sweep (🤖 perf: batch plugin MCP-override prunes so installs don't crawl per workspace #4144): prunePluginOverrideKeysForWorkspaces publishes after every prune landed (an inheriting descendant swept before its parent would otherwise publish the parent's pre-prune state) through the same fan-out publisher, and a ConfigSnapshot memoizes the authoritative workspace enumeration, the legacy config.json snapshot and host realpaths across one resolution/publication — or one whole sweep — so inheritance and sharer detection never re-parse config per workspace (the sweep stays one metadata load up front plus one post-sweep re-resolution). When the post-sweep enumeration fails, every cache is evicted and every swept workspace keeps its tombstone.
  • Filesystem identity resolves Coder hosts exactly like runtimeFactory (resolveCoderSSHHost), so distinct Coder machines sharing the raw coder:// placeholder never coincide; legacy config.json migration never writes over an existing document (even one this build normalizes to nothing).

Validation

  • Unit tests in workspaceMcpOverridesService.test.ts: parent-chain inheritance (grandchild), read-through (no file materialized in the child), child overrides win + CAS against the inherited revision, clearing resumes inheritance, removed-parent behaviour (strict re-reads must not throw, or the plugin uninstaller would retry an orphan's tombstone forever), descendant re-publication on save/prune/clear, raw fork copy, legacy migration before same-path skip.

  • New integration test tests/ipc/config/mcpWorkspaceOverridesInheritance.test.ts reproduces the user-visible symptom end-to-end with the real MCPServerManager + fixture stdio server by capturing the assembled request at StreamManager.startStream: global disable → no tools; workspace enable → shots_take_screenshot + tool_catalog_search (deferred); the same surface in a parentWorkspaceId child and in a fork. Confirmed red on main, green with this change.

  • make static-check green; workspaceService, workspaceMcpOverridesService, mcpServerManager, installService suites (755 tests) green.

  • Exec-backed stat now runs with LC_ALL=C so the absence classifier is locale-stable on remote hosts; the fork copy targets targetRuntime.getWorkspacePath(...) (multi-project forks persist the container root, not the primary checkout).

Risks

Low–moderate. Inheritance only kicks in when a child has no overrides of its own, and only via parentWorkspaceId (task children). The fork copy runs in the existing best-effort copy phase and is followed by the existing sanitization, so the plugin-consent security posture is unchanged. Every send in a child without its own file now performs one extra stat against the parent's checkout (remote for SSH parents), matching the cost of the child's own read.


Generated with xum • Model: anthropic:claude-fable-5-1 • Thinking: high • Cost: $12.80

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: f08b02a521

ℹ️ 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".

Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: f08b02a521

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: 644f0a1d36

ℹ️ 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".

Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 644f0a1d36

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: 41220dc65e

ℹ️ 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".

Comment thread src/node/services/workspaceService.ts
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 41220dc65e

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: b908b39a42

ℹ️ 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".

Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: b908b39a42

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: c4021b7a42

ℹ️ 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".

Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: c4021b7a42

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: 211137c5db

ℹ️ 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".

Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/mcpServerManager.ts
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated

@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 Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: 211137c5db

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread src/node/services/mcpServerManager.ts
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: cf5cdef83d

ℹ️ 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".

Comment thread src/node/services/workspaceMcpOverridesService.ts
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/mcpServerManager.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: dd55cbce1b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: 0aa31d1a32

ℹ️ 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".

Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
Comment thread src/node/services/workspaceMcpOverridesService.ts
Comment thread src/node/services/workspaceMcpOverridesService.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0aa31d1a32

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: b99e03bb8f

ℹ️ 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".

Comment thread src/node/services/workspaceMcpOverridesService.ts
Comment thread src/node/services/workspaceMcpOverridesService.ts

@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 Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: b99e03bb8f

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread src/node/services/mcpServerManager.ts Outdated
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: 697404f4a8

ℹ️ 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".

Comment thread src/node/services/workspaceMcpOverridesService.ts
Comment thread src/node/services/workspaceMcpOverridesService.ts

@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 Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: 697404f4a8

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread src/node/services/workspaceMcpOverridesService.ts
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security 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: ac29963391

ℹ️ 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".

Comment thread src/node/services/workspaceMcpOverridesService.ts
Comment thread src/node/services/mcpServerManager.ts
Comment thread src/node/services/di/layers/core.ts Outdated
…aces

Per-workspace MCP enables live in the gitignored `<checkout>/.xum/mcp.local.jsonc`;
sub-agent children and `workspace.fork` get fresh worktrees, so a server that is
disabled globally and enabled only for the parent silently disappeared for every
child — and with it `tool_catalog_search`.

- WorkspaceMcpOverridesService resolves through the `parentWorkspaceId` chain
  (read-through) when a workspace's own probes are positively absent and its own
  document/legacy value is recognized-empty; saves/prunes publish inheriting
  descendants; a cross-process epoch invalidates other processes' caches.
- Fork creation copies the effective source document raw into the new checkout
  (epoch/chain/precedence-checked commit point under the override lock).
- MCPServerManager re-validates caller override snapshots against disk/epoch and
  fails closed when it cannot vouch for enablement; TurnRequestBuilder derives
  the prompt inventory from the validated serve.
- Plugin-key pruning edits the parse tree (jsonc.modify corrupts compact arrays)
  and rejects documents that retain keys in fields this build does not own.
- Rebased onto main's additive server publication: retained entries carry the
  repaired inventory/generation; the cached and published serves go through
  serveResult (call-time gated tools, validated prompt descriptors).
- Round 77: a repair save is refused when authority was lost in an ANCESTOR
  (own document intact; `{}` is a fallback for the parent's settings); prompt
  discovery returns nothing for a fail-closed serve instead of listing the
  published entry; override path guards probe host files (local/worktree and
  devcontainer host worktrees) with lstat instead of exec'ing into a container.
- Round 78: a non-empty save is refused while the canonical document cannot be
  probed (the write would truncate fields it never read); the stdio launch fence
  aborts a launch that has not produced its exec stream by the deadline (startup
  timeout, retried) instead of releasing the writer's lock under it.
- Round 79: the migration's mkdir is a tracked side effect (joined before the
  locks release); recursive serves forward the caller's read abort signal.
- Round 80: devcontainer checkouts share the host filesystem identity (aliases
  contend for one lock); a child detaching from an inheriting chain carries the
  inherited document's forward-compatible fields (or refuses when unmergeable).
- Round 81: devcontainer sources are host-backed for path guards; prompt
  discovery re-serves when the entry or serve provenance changed during
  prompts/list; saves refuse to retire a legacy value mixing known settings
  (never shown) with unknown fields. Known limitation: a child cannot override
  an inherited value back to the project default (needs a detach marker).
- Round 82: host override documents whose bytes leave the checkout (fork copy,
  carried unknown fields) are read through an O_NOFOLLOW handle so a symlink
  swapped in after the path guards cannot exfiltrate a host file; the call-time
  gate compares recorded options by authorization equivalence, not identity.
- Round 83: checkout lock keys fall back to a lenient registry walk (accepted
  only when every requested id is still registered) so an unrelated legacy
  entry's malformed metadata.json cannot block rename/removal.
- Round 84: plugin-key pruning validates every override document before
  rewriting any (and publishes the epoch if a write fails after a rewrite); a
  directory at an override path is indeterminate, never absence (no
  inheritance through it); Windows separators normalized in the rollback match.
- Round 85: the call gate's disk-verdict invalidation uses authorization
  equivalence like dispatch (an equivalent pre-edit serve cannot mask a disk
  revocation); zero-timeout cross-process lock attempts reject without sleeping.
- Round 86: host document reads verify the opened handle after the O_NOFOLLOW
  open (segments re-guarded under the checkout's realpath; the canonical file
  must be the handle's inode), so a parent segment swapped to a symlink cannot
  redirect the fork copy to a sibling checkout's document.
- Round 87: the override epoch and writer locks live under the MCP
  configuration root (`coordinationRootDir`), so `xum run` (disposable registry
  root) coordinates with a desktop/server backend on the persistent home.

Squashed from 82 review-round commits when rebasing onto main (pre-rebase history
kept on local backup branches).

_Generated with `xum` • Model: `anthropic:claude-fable-5-1` • Thinking: `high` • Cost: `$712`_
<!-- mux-attribution: model=anthropic:claude-fable-5-1 thinking=high costs=712 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: cf3a9840f1

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: cf3a9840f1

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit 788d4a4 Sep 10, 2026
51 of 56 checks passed
@ThomasK33
ThomasK33 deleted the mcp-server-gsaf branch September 10, 2026 18:12
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.

1 participant