Skip to content

Agent: remember per-project MCP defaults - #1159

Merged
AnthonyRonning merged 3 commits into
masterfrom
codex-agent-1156-maple
Oct 16, 2026
Merged

AnthonyRonning merged 3 commits into
masterfrom
codex-agent-1156-maple

Conversation

@marksftw

@marksftw marksftw commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

New-task custom MCP switches now save per-project defaults. Each server follows the global Settings switch until explicitly changed in that project. Sending the first message snapshots the displayed choices; toggling a server in an existing task affects only that task.

Project choices use an account-scoped, device-local sidecar keyed by canonical folder and server identity. Switching projects reloads those choices while preserving the unsent draft, and Off servers remain available in the menu. Server definitions remain in the global Settings catalog.

Fixes #1156.

Shared-host integration

Rebased onto 22611507, including the shared desktop/ACP host from #1161. Desktop reads and writes project defaults through typed host operations, using the existing account checks and settings lock. New desktop and ACP tasks inherit the same defaults; loading an existing task preserves its own selections.

Host recovery reloads a draft's project defaults and retains unsent text and local choices. If the connection drops while first send is waiting for those defaults, the UI clears the pending send and asks the user to send again after reconnecting. It does not replay a prompt automatically.

Validation

  • Full component just ci through MAPLE_HOOK_FULL=1 pre-commit passed on macOS: formatting, all four Clippy configurations, workspace build/tests, and headless ACP/proxy tests. Includes 271 runtime tests (2 ignored), 464 desktop tests, and 68 headless tests.
  • Project-default regressions cover inheritance, explicit overrides, task snapshots, persistence, canonical paths, private account-local files, malformed data, and account isolation.
  • Host dispatch regression covers concurrent settings writes, operation during credential validation, account checks, and storage reopening.
  • ACP protocol regression covers shared defaults across desktop/ACP and retained task choices after a new ACP connection loads the task.
  • A local HTTP MCP fixture confirms that a project override exposes the server's tools even when its global default is Off.
  • Desktop regression reproduces the interrupted first-send wait and verifies recovery clears it, reloads defaults, and retains composer text.

These checks use isolated local fixtures and a scripted model. Authenticated live inference and a new Paseo smoke were not run. Hosted platform and packaging checks are pending for the pushed head.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Copy link
Copy Markdown
Contributor

@marksftw we reviewed this and think it's good to merge, provided you've tested it and it works from your side. If it does, go ahead and mark it ready for review.

What we pushed: one docs-only commit, a404e73. It updates the README to say that tasks created over ACP also pick up a project's saved MCP choices, since they create tasks without naming servers.

Possible follow-ups: none of these block this PR.

  • A way to put a server back to following the Settings switch once a project has a saved choice.
  • Removing saved project choices when a server is deleted, so they don't come back if a server with the same name is re-added.
  • Cleaning up entries for removed projects.
  • A shared rule for unreadable device-local files and file versions. Probably best decided if these files move to SQLite.

Generated by Claude Code

marksftw and others added 3 commits October 16, 2026 18:50
ACP sessions create tasks without naming servers, so their account
servers follow the Settings switches with the project's saved choices
applied. Say so in the custom MCP and ACP sections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GkZQmZL1DVpBz28aefPoaw
@AnthonyRonning
AnthonyRonning marked this pull request as ready for review October 16, 2026 19:42
@AnthonyRonning
AnthonyRonning merged commit 162ff7f into master Oct 16, 2026
37 checks passed
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.

Maple Agent: Project-based MCP Settings

3 participants