agy_close_agent
Terminate a running Antigravity subagent and its process tree, then optionally remove its isolated Git worktree and temporary branch to free resources after work is merged or discarded.
Instructions
Cancel/close an Antigravity subagent (mirrors native Codex close_agent). Terminates any running process tree and optionally removes its isolated Git worktree.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_id": "<agent_id>"
},
"name": "agy_close_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | Agent ID to close. | |
| delete_branch | No | Also delete temporary agy-sub/<id> branch (set true only after merging or discarding). | |
| cleanup_worktree | No | Remove temporary worktree directory if isolation='worktree' was used. |