Repository navigation
fix(control): preserve Codex tool approvals during MCP setup - #818
Merged
Merged
Conversation
Recover the original hash-proven connection prefix when nested tool approval tables have been added, and move the ownership boundary ahead of preserved policy. Validate complete TOML semantics before publishing changes. Retain a disabled URL-only connection without credentials when policy needs to survive disable/re-enable. Refs #817
This was referenced Sep 6, 2026
Juliusolsson05
added a commit
that referenced
this pull request
Sep 6, 2026
…signatures origin/main advanced past the review base (external operator toolkit #812, MCP tool policy #818) while pane-runtime-isolation was in review, and those PRs added control tests that call the pre-isolation hook signatures. The merged-tree quality-gate caught two TS errors that the stale worktree base could not surface: - control.renderer.test.tsx passed a Dispatch<SetStateAction<number>> as the draft-version signal, which now types as a plain () => void bump; the test reads drafts imperatively via inspectAgentDraft, so a stable no-op bump is behaviorally faithful. - preferences.renderer.test.tsx passed the render-time runtimes snapshot that useWorkspaceHelpers no longer takes; the helper reads runtimes through refs and toggles via the setRuntimes updater, so only (setRuntimes, refs) remain. No production code changed. Merged-tree verification: forced typecheck clean, full renderer suite 123 files / 523 tests green on Node 24 with two workers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #817.
Adding per-tool approval settings inside Agent Code's managed Codex server block made its ownership checksum fail, which stopped the enabled MCP listener. Setup now recovers the exact original connection prefix using its existing checksum, moves the ownership boundary before the tool policies, and preserves those policies through restart, retry, key rotation and disable/re-enable.
The TOML transformation is isolated from file installation and transport. It verifies complete parsed before/after semantics so marker-shaped string contents, scope changes and actual connection edits cannot be mistaken for owned configuration. Existing skill ownership, symlink refusal and compare-before-replace checks remain. When policy survives disable, Codex retains an explicitly disabled URL-only server definition with no connection credential; re-enable restores the managed connection around the same policies.
Validation:
npm run typecheck,npm run test:contractandgit diff --checkpass.Limits: arbitrary connection reformatting or edits still require manual conflict resolution. This verifies server recovery and its status capability, not every live renderer control. The running app was not restarted or hot-patched and needs the fixed build before its existing listener can recover. This change does not alter the separate agent-names work in #816.
Plan-first history:
docs/decomposition/mcp-tool-policy.md, followed by the implementation. No merge without user confirmation.