Farmwork troubleshooting and FAQ for MCP, quality gates, and v3 upgrades
Fix MCP connection problems, get failing farmwork gates passing again, and move older Farmwork v1 or v2 projects to v3 safely.
Most Farmwork problems come down to three things: an AI tool that can't reach the MCP server, a quality gate that keeps failing, or an older project that hasn't been moved to v3 yet. Start with farmwork doctor. It checks every part of your setup and prints a fix next to each problem.

What you can skip
- Don't delete
.farmwork.jsonto start over. Runfarmwork init --forceinstead. - Don't uninstall Farmwork to fix MCP. It's almost always a config or restart issue.
- Skip the leftover v1/v2 files cleanup until you're ready. It's optional.
1. Run farmwork doctor
farmwork doctor
farmwork doctor --json
It checks 14 things, including the v3 .farmwork.json, AGENTS.md, CLAUDE.md, .mcp.json, the three _AUDIT/ files, _PLANS/, the justfile, Beads, context and code hygiene, test files, and leftover v1/v2 files. You'll get a Doctor Score and All Farmwork v3 checks passed. when everything is green.
2. Fix MCP connection issues
| If you see | Try this |
|---|---|
Claude Code doesn't list farmwork in /mcp |
Approve the project's .mcp.json server when asked, or run claude mcp add farmwork -- npx -y farmwork mcp |
| Codex or Antigravity can't find Farmwork tools | These don't read .mcp.json. Add the server to their global config (see MCP setup), then restart |
farmwork: command not found from the agent |
The agent can't see your global install. Run farmwork init --npx to use npx -y farmwork mcp instead |
| Tools return another project's data | Pass projectPath in tool calls, or start the server with farmwork mcp --cwd /path/to/repo |
| Server starts then drops right away | Check you're on Node.js 18 or newer with node --version |
| Old tools or prompts still showing | Restart your AI tool after updating Farmwork with npm install -g farmwork |
To check the server by hand, ask your agent to "call farmwork_status." A score and breakdown back means it's connected.
3. Fix failing quality gates
farmwork gates
farmwork gates --only test
Failing gates print the last 35 lines of output so you can see what broke.
| If you see | Try this |
|---|---|
lint or test fails with "command not found" |
The command in .farmwork.json is wrong. Fix commands.lint or commands.test |
test fails after about 2 minutes |
Each gate stops after 120 seconds. Use a faster test command for gates |
security fails on Committed .env file |
Remove the file from git, add .env* to .gitignore, and rotate any keys inside it |
security fails on an API key |
Move the key into an environment variable and rotate it with the provider |
build: skipped (no command configured) |
That's fine. Skipped gates don't fail the run |
Quality Gates (... stale ...) |
You committed after the last run. Run farmwork gates again |
Quality Gates (no lint/test/build commands configured) |
Add at least one command to .farmwork.json |
Gates are worth 2.5 of your 10 health points, so getting them green on your latest commit is the quickest way to raise your score.
4. Upgrade older repos to Farmwork v3
Farmwork v3 recognizes older setups by files like _OFFICE/, _RESEARCH/, .claude/agents/the-farmer.md, .claude/commands/audit.md, _AUDIT/KNIP.md, or _AUDIT/TESTS.md. When it sees them, it won't touch the repo:
farmwork viewopens it read-only.farmwork init,farmwork audit, and editing tools refuse with aPast Farmwork (v1)or(v2)message.
When you're ready to upgrade:
cd old-project
farmwork init --reinstall
| Reinstall replaces | Reinstall keeps |
|---|---|
.farmwork.json |
_PLANS/ |
AGENTS.md |
_AUDIT/GARDEN.md |
CLAUDE.md |
_AUDIT/COMPOST.md |
_AUDIT/FARMHOUSE.md |
Other servers in .mcp.json |
At the end, Farmwork lists Optional Legacy Cleanup files you can delete when you're ready. Then run farmwork gates and farmwork audit to get your first v3 score.
Troubleshooting
| If you see | Try this |
|---|---|
Farmwork is not initialized in this directory. |
You're in the wrong folder, or need to run farmwork init |
Farmwork v3 is already initialized here. |
Existing files are kept. Add --force to rewrite them |
add refused on the checklist |
It's at 30 items. Move small tasks to Beads |
Doctor flags AGENTS.md |
Trim it under 180 lines and fix any broken file paths |
Related guides
Frequently Asked Questions
Will Farmwork v3 change my older Farmwork projects on its own?
No. v3 never updates v1 or v2 projects by itself. It opens them read-only and only upgrades a repo when you run farmwork init --reinstall inside it.
What does farmwork init --reinstall keep?
It keeps your _PLANS/ folder, GARDEN.md, COMPOST.md, and any other servers in .mcp.json. It replaces .farmwork.json, AGENTS.md, CLAUDE.md, and FARMHOUSE.md with v3 versions.
How do I skip a gate my project doesn't have?
Set that command to an empty string in .farmwork.json, like "build": "". The gate then shows as skipped and won't fail the run.
What's the fastest way to see what's wrong?
Run farmwork doctor. It checks every part of the setup and prints a fix next to anything that failed.