Troubleshooting
These checks mirror the open-source `tokenpatch doctor` flow and common hosted gateway failures.
| Symptom | Likely cause | Fix |
|---|---|---|
| Plan fails before request | Missing strong model key/model | Keep GPT/Claude keys in Codex/Cursor/Claude Code, or set planner/reviewer config for CLI mode. |
| Run fails with Git error | Project is not a Git repo or has no HEAD | Run `git init` and create a baseline commit before executor runs. |
| Patch rejected | Generated diff touched files outside allowed_files | Narrow the allowed files list or split the task into smaller requests. |
| Gateway token rejected | Missing or invalid `tp_live_...` token | Create a fresh token in dashboard and update `MMDEV_GATEWAY_TOKEN`. |
| Insufficient balance | Credits are zero or request is too large | Recharge or reduce prompt/output size before retrying. |