Repository navigation
feat(execenv): pass the managed MCP config to agy as a per-task plugin (CHE-1821) - #287
Merged
Merged
Conversation
added 5 commits
October 16, 2026 12:29
…ponents (CHE-1821)
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.
Status: Independent verification: PASS on X99. Reviewer: x99-codex-sol, OpenAI gpt-6.1-sol, independent of Anthropic author x99-claude-sonnet. Current head:
2fc88de53f07606b58e994d93760f3c9740ba558. Current base:2b135399996d8072c5a99deb88ef55edb62f49b4. Fresh OCR delegation and OER-1 receipt validation pass for this pair. CI: 13 successful checks, 7 skipped, 0 failed/pending. PR #290 (CHE-1824) repaired the baseline migration failure. Signed verdict on CHE-1821:01a1476c-3951-7343-9481-1e6ef10a5b3b. Merge stays with Cheese.Conditions:
<cwd>/.agents/plugins/<name>/mcp_config.json..agents. A plugin is therefore visible to every run started below the directory that holds it. It is safe only in a workdir that belongs to one task.mcpServersdoes not switch the global servers off.sseis not supported by agy. Streamable HTTP (urlplusheaders) and stdio work.Change:
server/internal/daemon/execenv/antigravity_mcp.go. When the agent has a managedmcp_configand the provider isantigravity, Prepare and Reuse write.agents/plugins/multica-mcp/plugin.jsonandmcp_config.json(mode 0600, directory 0700) into the task workdir. The config is written verbatim..agents,.agents/plugins,multica-mcp) must be a plain directory. A tracked symlink is refused, so credentials cannot leave the private tree. A managed env and a per-task local worktree are allowed. An in-placelocal_directoryfails closed with an error, because humans and unmanaged runs share that tree.CleanupSidecars) removes only those. A pre-existingmultica-mcppath is refused, never overwritten. Reuse rolls back the prior plugin first, so a changed or removed config does not leave a stale plugin.server/pkg/agent. The workdir is owned by execenv, as for omp and cursor.Evidence:
filepathJoinlint. Fixed tests-first. Commit48349d19dac562610118a7d52e663dbd0021a673is tests only. Against its parent, 4 new symlink tests fail (.agents,.agents/plugins, plugin dir, and Reuse) and the dangling-link control passes. It also replaces the 3 slash-joinedfilepath.Joincalls. Commit829555f70ed079f320fc0541f8fb6f6223f6d646adds the guard and makes them pass.golangci-lint run --new-from-rev=1b238338d ./internal/daemon/execenv/...reports 0 issues.4a23818aais tests only. Against its parent, 5 of 7 new tests fail on behavior (plugin missing, in-place run not refused, pre-existing plugin overwritten). The 2 control tests (no config, other provider) pass on the parent, as intended. Commit50b8fe5abmakes all 7 pass.2fc88de53f07606b58e994d93760f3c9740ba558and base2b135399996d8072c5a99deb88ef55edb62f49b4. Independent reviewer: x99-codex-sol, OpenAI gpt-6.1-sol. Status:delegation-complete. No remaining P0/P1 finding. Receipt attachment on CHE-1821:01a1476c-35d0-7ea1-9bf0-bc2c93b319eb(ocr-receipt-2fc88de.json). The officialvalidate_receipt()passes atcheese-work/multica-dotfiles@75fed83dcdf007d2524bcdd44fc740a098aaa96f, blob465398e360c7b706034518161c7aabea5f050bdf. The old head's receipt remains historical, not evidence for this pair.mainby PR fix(migrations): renumber agent_task_queue_context to clear duplicate prefix 627 (CHE-1824) #290 (CHE-1824). This PR merged thatmainwith a merge commit, no rebase, and changed no migration.go test ./internal/migrationspasses on the merged head.~/.local/share/agy/1.3.5/agy, sha256e14253aa79d4e910cbf8bcb40b68e80f9e85476725e130ed085122c98face92b. The directory says 1.3.5 and--versionprints 1.3.6. The file mtime is 16 Oct 2026 01:05 ICT, after the directory was created, so the binary was likely replaced in place by a later release (inference, not verified). All probe results apply to this hash only.urlplusheaders(also withtype: http), the fixture server saw the header on every request, includingtools/call.local_directoryis refused.hindsight-orgwas spawned and called while the globalhindsight-orgexists.CleanupSidecarsrestored the workdir to empty, an agent-added sibling plugin survived, and no fixture process was left.go test ./internal/daemon/execenvfails the same 7 tests with and without this change (openclaw and hermes tests, host related). With the default TMPDIR, 3 cursor tests also fail because/tmp/.gitand/tmp/.cursor/mcp.jsonexist on this host.go test ./internal/daemonpasses.go test ./pkg/agentpassed once and failed once inTestPiExecuteTurnErrorActivityAndRetryRecoveryCancelTimer, a timer test that passes 3 of 3 when run alone (flaky, not touched by this PR). The backend CI job also failsTestMigrationNumericPrefixesAreUnique(duplicate migration 627) on the parent, not caused by this PR.go vetis clean.hindsight-orgmcp_configand remove the global entry.Red output (Test-First Gate)
Round 1. Contemporaneous output of the tests-only commit
4a23818aa4ce9b14cbefbc9c6fd57739235d2933run on 16 Oct 2026 at 12:29 ICT, saved to a file at that time. The parent is1b238338dda4c5d1b5637c5f6ec54a0a5b07852f. Command:go test ./internal/daemon/execenv/ -run 'Antigravity|OtherProviderWritesNoAntigravity' -count=1. The two control tests pass and are not listed.Round 2. Tests-only commit
48349d19dac562610118a7d52e663dbd0021a673, parent50b8fe5abf0c4ff006caf6801cf7fa846fab9bf4. The author kept only the test names from the run at 13:03 ICT, not the messages. The text below is a re-run of the same commit and command, captured later on 16 Oct 2026 for this body. It is not the original run. The dangling-link subtest and the earlier tests pass.Writing receipt: meaning check OK. Of 16 advisory warnings, 15 are true positives (13 passive phrases, 2 long sentences). The synonym warning is a false positive because it refers to different changes.
Changelog: Antigravity agents now receive the MCP servers saved on their agent.
Refs CHE-1821