# Troubleshooting

Start with `devworkspace doctor`. Every warning/failure includes a remediation line.

| Problem | What to do |
| --- | --- |
| **Unsupported Node version** | Needs Node ≥ 20.11. `node -v`; install from nodejs.org or use nvm/fnm. `doctor` shows the requirement. |
| **Git unavailable** | Install Git. DevWorkspace still works but cannot report branch/working-tree state or tracked-secret problems, and Claude cannot protect uncommitted changes. |
| **Not a Git repository** | Fine. `status` shows `Git: not a repository`. Consider `git init` so changes can be reviewed and reverted. |
| **"No DevWorkspace found"** | Run `devworkspace init` in the project root. Commands search upward from the current directory; use `--cwd <dir>` if you are elsewhere. |
| **`setup --integrations` says approval is needed (exit 2)** | Nothing risky ran. Review with `--dry-run`, then re-run with `--yes`. Machine-level (installing the Graphify tool), user-level and registry-package steps always need it. |
| **`PREREQUISITES_MISSING` for Graphify** | Install uv (`winget install --id astral-sh.uv`) or Python 3.10+ from python.org. On Windows the Microsoft Store `python` shortcut is not Python. Then re-run setup. |
| **Graphify `RESTART_REQUIRED`: "on your user PATH ... started before that was set"** (Windows) | The folder is already on your persistent PATH; this terminal/VS Code started earlier and still has the old one. Close and reopen the terminal, or restart VS Code (and Claude Code). Do not add it again. |
| **Graphify `DEGRADED`: not on PATH** | Its Claude Code hooks call `graphify` by name and it is on no PATH (on Windows: not in this terminal and not in your persistent user/machine PATH). Add the folder shown in the next step to PATH (or run `uv tool update-shell` / `pipx ensurepath`) and open a new terminal. |
| **`RESTART_REQUIRED`** | Restart Claude Code (or run `/reload-plugins`), then `devworkspace integrations status --restarted`. |
| **`setup --agent` reports a failed server check** | The report names the stage: *launch* (launcher not found: install Node.js 20.11+, or use `--launcher npx`; for `--launcher direct` run `npm i -g devworkspace`), *initialize*/*tools list* (CLI and launcher versions differ: align them or pin `--package-version`), *tool call*/*context* (run `devworkspace doctor` then `devworkspace refresh`). Network or registry failures show up as a launch timeout when `npx` must download the package. Setup is idempotent; re-run after fixing. |
| **Setup says the launcher started a different devworkspace version** | The server that answered is not the CLI that ran setup (typically an unpinned source-checkout launcher fetching the latest *published* release, or a stale global install). Publish/install the intended version, then re-run with `--package-version <v>` or `--launcher direct`. |
| **`.mcp.json` reported as invalid JSON / conflict** | Setup never overwrites it. Repair or move the named file aside, then re-run `devworkspace setup --agent <name>`. |
| **Server check passes but the agent shows no DevWorkspace tools** | The check covers the server only. Reload the agent, approve the project-scoped `devworkspace` server when prompted (Claude Code: `/mcp`), and for Codex/Antigravity restart the agent. |
| **Claude Code says `"/graphify" isn't installed in this session`** | 1. If `doctor` shows `Claude skill: missing` or `DEGRADED (cli without project skill)`, run `npx devworkspace setup --integrations --yes` (runs `graphify install --project`) to install `.claude/skills/graphify/SKILL.md`.<br>2. Claude Code caches skills at startup. If Claude Code was already open when the skill was installed, run `/reload-plugins` in Claude Code or restart the session before typing `/graphify .`. |
| **Plugin install fails with "Host key verification failed" / "Could not read from remote repository"** | Claude Code cloned the plugin over SSH and you have no GitHub SSH key. Run the documented fix yourself (it edits your global Git config): `git config --global url."https://github.com/".insteadOf git@github.com:`, then re-run setup. |
| **Plugin or marketplace clone times out** | Slow or blocked access to github.com. Retry later; Claude Code's own timeout can be raised with `CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS`. Setup resumes from what is already done. |
| **Agent Skills / Ponytail `DEGRADED` (portable skills)** | The Claude Code CLI was not found, so only portable skills were installed (no slash commands/hooks). Install the native plugin: `claude plugin marketplace add <url> --scope project` then `claude plugin install <plugin>@<marketplace> --scope project`, or put `claude` on PATH and run `devworkspace integrations repair --yes`. |
| **Setup was interrupted (Ctrl+C, crash)** | Run `devworkspace integrations repair --yes`; it continues from what is observed on disk. Files you own are never left half-edited by DevWorkspace, and `git diff` shows exactly what tools changed. |
| **Graphify unavailable / no graph** | `uv tool install graphifyy` (or `pipx`), `graphify install --project`, then run `/graphify .` in Claude Code. DevWorkspace keeps working without it. |
| **Claude config conflict** (`agent install` reports `CONFLICT`) | Unbalanced `devworkspace:start/end` markers in `CLAUDE.md`, or a user-authored skill at `.claude/skills/devworkspace/`. Fix/remove the stray marker or rename your skill, then re-run. Nothing was changed. |
| **Claude ignores my `AGENTS.md`** | Claude reads `AGENTS.md` only when no `CLAUDE.md` exists. `agent install` adds an `@AGENTS.md` import when it creates `CLAUDE.md`; if you created `CLAUDE.md` yourself, add `@AGENTS.md` to it. |
| **Stale context** | `devworkspace refresh`, then paste `.devworkspace/analysis/refresh-prompt.md` into Claude. Facts without cited `--file` sources can never be proven stale. |
| **Want to start completely fresh** | `devworkspace reset --yes` (add `--include-agent-files` to also remove the Claude block and skill), then `devworkspace init`. `reset` without `--yes` only prints a plan. |
| **Corrupted workspace** (`malformed JSON`, schema errors) | `git checkout -- .devworkspace/<file>`; or copy a backup from `.devworkspace/local/backups/`. A newer-schema file means upgrade DevWorkspace. Leftover `*.tmp` files come from an interrupted write and are safe to delete. |
| **"Another DevWorkspace process is modifying this workspace"** | Wait. If no DevWorkspace process is running, delete `.devworkspace/local/workspace.lock` (stale locks from dead processes are normally broken automatically). |
| **Tests were failing before my task** | Record a baseline: `devworkspace task tests <id> --phase baseline --passed N --failed M`. Only *increases* in failures block completion. |
| **Project moved / different drive** | Nothing to do; identity is an id, not a path. `doctor` warns if knowledge contains absolute paths. |
| **Package manager unavailable** | The testing contract is inferred from files, so it lists `pnpm`/`yarn` commands even if not installed. Edit `context/commands.json` (set `origin: "user"`) to use what you have. |
| **Windows: `EPERM` on write** | Editors, antivirus or indexers can briefly lock files; writes retry for ~2 s. If it persists, close the program holding the file. |
| **Windows: PowerShell blocks `devworkspace.ps1`** | `npm` creates `.cmd` and `.ps1` shims. Run via `devworkspace.cmd`, `npx devworkspace`, or relax the execution policy for your user (`Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`). |
| **`.devworkspace` not appearing in Git** | The root `.gitignore` ignores it. Remove that rule; `.devworkspace/.gitignore` already excludes the machine-local parts. |
| **`doctor` warns "package manifest(s) the last analysis did not record"** | The analysis predates nested-package detection. Run `devworkspace analyze`; commands you confirmed earlier are kept. |
| **`doctor` warns "No ecosystem was detected" or "No verification commands"** | The analyzer found no recognised manifest or scripts. Add them, or write the commands in `.devworkspace/context/commands.json` (`"origin": "user"`, optional `"cwd": "backend"`). If the project intentionally has none, set `"acknowledgeNoVerification": true` under `settings` in `.devworkspace/project.json`. |
| **Analysis seems incomplete** | `status`/`doctor` says "partial" when file or depth limits were hit. Raise `settings.maxFiles` in `project.json` or add `.devworkspaceignore` entries for generated folders. |

Add `--debug` to any command for stack traces and debug logs (secrets are still redacted).
