Troubleshooting
Common issues and fixes.
foyer status exits with code 2
The CLI couldn't validate your token. Re-run foyer login to refresh the
device-code flow. If ~/.foyer/credentials exists but is rejected, the token
has likely expired or been revoked from the admin console.
MCP server shows -32000 JSON-RPC error
The token wired into the MCP server has a trailing newline. This happens
when the token is piped from a shell variable or copy-pasted. Re-install the
MCP server using the jq pattern from the MCP install page:
--env FOYER_TOKEN="$(jq -r .token ~/.foyer/credentials)"
PR comment is missing on a repo I installed
Check the installation status page in the Foyer app. The most common causes:
- The GitHub App was installed on the org but the specific repo wasn't included in the repo allowlist.
- The PR's head SHA is older than the install — Foyer only verifies SHAs created after the install completed. Push a new commit to retrigger.
- The Foyer App lost its installation token. Reinstall from api.getfoyer.dev/auth/github/install.
Verification comment shows [partial] and never updates to complete
The dynamic pass (tests / build / smoke) failed to boot a workspace. Open
the verification detail page from the PR comment — the orchestrator logs
will show which stage stalled. Common causes: an node_modules install
that exceeded the workspace timeout, or a private dependency Foyer can't
fetch.
CLI says "token rejected" right after foyer login
You're probably pointed at the wrong API. foyer status prints the URL it's
hitting. If it shows a non-default value, unset FOYER_API_URL and retry:
unset FOYER_API_URL
foyer status