fix: async run_tests to prevent zombie cargo processes blocking gates

run_tests MCP tool now spawns tests in the background and returns
immediately. Agents poll get_test_result to check completion. This
prevents zombie cargo processes from holding the build lock when the
CLI times out the MCP call before tests finish.

Also fixes agent permission mode: acceptEdits replaces invalid
allowFullAutoEdit that was causing agents to crash-loop on spawn.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dave
2026-04-11 22:00:05 +00:00
parent 8393a67c89
commit f958f57e56
6 changed files with 262 additions and 63 deletions
+5 -4
View File
@@ -198,11 +198,12 @@ fn run_agent_pty_blocking(
// and instead leak as unstructured PTY text.
cmd.arg("--include-partial-messages");
// Agents use allowFullAutoEdit so the worktree's .claude/settings.json
// controls which tools are pre-approved. Anything not in the allowlist
// triggers the permission prompt tool, which auto-denies for agents.
// Agents use acceptEdits so file edits are auto-approved while other
// tools (e.g. Bash) trigger the permission prompt tool, which auto-denies
// for agents. The worktree's .claude/settings.json allowlist further
// controls which tools are pre-approved.
cmd.arg("--permission-mode");
cmd.arg("allowFullAutoEdit");
cmd.arg("acceptEdits");
cmd.arg("--permission-prompt-tool");
cmd.arg("mcp__huskies__prompt_permission");