fix(dev): seed project MCP approval for lab AFK runs #70
No reviewers
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos!70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/lab-afk-mcp-trust"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
A lab AFK run (e.g. for issue #63) launched but never started work: it sat idle on claude's startup prompt
6 minutes alive, ~2s CPU — frozen with no human to clear the prompt.
Root cause
.mcp.json(which declares thenixosserver) is tracked, so everygit worktree addfor an AFK run inherits it. But the human's approval of that server lives in.claude/settings.local.json(enableAllProjectMcpServers: true), which is gitignored and therefore absent from the fresh worktree.SeedTrustpre-accepted the folder-trust dialog but never the MCP-server prompt, so the run stalled.Fix
Extend
SeedTrustto also setenableAllProjectMcpServers: trueon the worktree's project entry in~/.claude.json— the same grant as clicking "Use this and all future MCP servers in this project", and strictly narrower than the folder-trust dialog already seeded there. Both manual and AFK spawns route throughSeedTrust, so this covers any project shipping a committed.mcp.json.Testing
go build ./...,go vet ./...,go test ./...all pass inhosts/fw/vms/dev/modules/lab.TestSeedTrust_enablesProjectMcpServers,TestSeedTrust_enablesMcpWhenAlreadyFolderTrusted(the exact shape of the hung worktree). Updated the idempotency test to treat an entry as fully seeded only when both fields are set.fw: OK.