Stage
uninstall
Coding agent
OpenAI Codex
Coding agent version
Codex desktop; Monk plugin v0.1.54 (2a4f9cf)
Repro steps
-
Check out v0.1.54 on a POSIX shell where python3 is available and jq is absent, so remove_antigravity_mcp takes its Python fallback.
-
Set HOME to an isolated path containing an apostrophe, for example .../home/O'Connor.
-
Create $HOME/.gemini/config/mcp_config.json with both Monk and an unrelated server:
{
"mcpServers": {
"monk": {"serverUrl": "http://127.0.0.1:7419/mcp"},
"preserved": {"serverUrl": "http://127.0.0.1:9999/mcp"}
},
"preserved": {"value": "still here"}
}
-
Run scripts/uninstall-monk-agent.sh --yes with MONK_AGENT_HOME and MONK_AGENT_INSTALL_DIR also pointing inside that isolated home.
-
Inspect the config after the command reports completion.
I reproduced this with a network-free regression that isolates HOME and PATH, forces the Python branch, and asserts that only mcpServers.monk is removed. The current release fails deterministically:
monk-agent uninstall complete.
Traceback (most recent call last):
File "<string>", line 7, in <module>
AssertionError
The config is unchanged and still contains mcpServers.monk.
Expected behavior
The official uninstaller removes only the Monk-owned MCP entry, preserves unrelated config, and reports completion.
Actual behavior
remove_antigravity_mcp interpolates $mcp_cfg directly into generated Python source:
with open('$mcp_cfg') as f:
...
with open('$mcp_cfg', 'w') as f:
The apostrophe terminates the Python string and produces a SyntaxError. The shell then swallows that failure with 2>/dev/null || true, prints monk-agent uninstall complete., and leaves a dead Monk MCP registration pointing at the removed companion.
I validated the minimal fix locally: pass the config path as a sys.argv value and use that variable in both open calls. The new regression then passes, as do sh -n scripts/uninstall-monk-agent.sh and git diff --check.
Collision check
Severity (your guess)
minor
The uninstall claims success but leaves persistent global host configuration behind. Later Antigravity sessions can keep trying to connect to a server the same uninstall just removed. Installing jq or avoiding an apostrophe in the home path works around it.
OS
Windows 11 with Git Bash for the isolated POSIX regression; the vulnerable shell code is shipped for macOS and Linux.
monkd version
Not involved; this is local plugin cleanup.
Target cloud
None; network-free local source fixture.
Integration
Google Antigravity MCP registration cleanup
Fix PR
#267 adds the current-release red-to-green regression and the validated fix across both shipped POSIX uninstaller mirrors.
Stage
uninstall
Coding agent
OpenAI Codex
Coding agent version
Codex desktop; Monk plugin v0.1.54 (
2a4f9cf)Repro steps
Check out v0.1.54 on a POSIX shell where
python3is available andjqis absent, soremove_antigravity_mcptakes its Python fallback.Set
HOMEto an isolated path containing an apostrophe, for example.../home/O'Connor.Create
$HOME/.gemini/config/mcp_config.jsonwith both Monk and an unrelated server:{ "mcpServers": { "monk": {"serverUrl": "http://127.0.0.1:7419/mcp"}, "preserved": {"serverUrl": "http://127.0.0.1:9999/mcp"} }, "preserved": {"value": "still here"} }Run
scripts/uninstall-monk-agent.sh --yeswithMONK_AGENT_HOMEandMONK_AGENT_INSTALL_DIRalso pointing inside that isolated home.Inspect the config after the command reports completion.
I reproduced this with a network-free regression that isolates
HOMEandPATH, forces the Python branch, and asserts that onlymcpServers.monkis removed. The current release fails deterministically:The config is unchanged and still contains
mcpServers.monk.Expected behavior
The official uninstaller removes only the Monk-owned MCP entry, preserves unrelated config, and reports completion.
Actual behavior
remove_antigravity_mcpinterpolates$mcp_cfgdirectly into generated Python source:The apostrophe terminates the Python string and produces a
SyntaxError. The shell then swallows that failure with2>/dev/null || true, printsmonk-agent uninstall complete., and leaves a dead Monk MCP registration pointing at the removed companion.I validated the minimal fix locally: pass the config path as a
sys.argvvalue and use that variable in bothopencalls. The new regression then passes, as dosh -n scripts/uninstall-monk-agent.shandgit diff --check.Collision check
start-monk-agent.sh; its v0.1.53 fix updated the three rendered launcher copies, not this uninstaller path.Severity (your guess)
minor
The uninstall claims success but leaves persistent global host configuration behind. Later Antigravity sessions can keep trying to connect to a server the same uninstall just removed. Installing
jqor avoiding an apostrophe in the home path works around it.OS
Windows 11 with Git Bash for the isolated POSIX regression; the vulnerable shell code is shipped for macOS and Linux.
monkd version
Not involved; this is local plugin cleanup.
Target cloud
None; network-free local source fixture.
Integration
Google Antigravity MCP registration cleanup
Fix PR
#267 adds the current-release red-to-green regression and the validated fix across both shipped POSIX uninstaller mirrors.