# Troubleshooting

Diagnose sign-in, connection, input, job, and download failures without accidentally starting more work.

Start with the failed operation, the API host, the organization, and the job ID if one was returned. A failed HTTP request and a failed model job are different problems. Preserve the response body before trying again.

## Check the connection and identity

Run these from the same terminal, notebook environment, or machine that had the problem:

```bash
phi --version
phi auth whoami
phi doctor
```

Check the reported API address and organization. A key created for one organization does not grant access to another organization's jobs. A staging address and a production address are separate environments. Use the address copied from the API keys tab when working outside production.

## Sign in or access is refused

| Symptom | Check | What to do |
| --- | --- | --- |
| `401` or a signed-out message | Is the credential present in the process that runs the client? Is the key revoked or expired? | Sign in again with `phi auth login`, or replace the key in that process's environment |
| `403` | Does the operation require an organization admin? Does the credential act in the expected organization? | Use the right organization's credential, or ask an admin to perform the action |
| A known job returns `404` | API host, organization, job ID, and whether the run was deleted | Correct the host or identity before assuming the job is missing |
| A browser sign-in cannot open on a remote machine | Whether that machine has a browser | Use `phi auth login --device`, or the API key instructions |

The [API keys guide](/docs/guides/api-keys) explains how to create and revoke keys. [Permissions](/docs/reference/permissions) lists restricted actions. Do not print a key or paste it into a support conversation.

## Your AI cannot see Phi tools

Check that the server address ends in `/mcp` and matches the environment where you signed in. In the client's connection settings, check that Phi is enabled and authentication completed. In clients with a tool picker, enable Phi's tools for the conversation.

If you changed a configuration file or an environment variable, reopen the client so its process receives the change. A variable exported in a terminal is not automatically available to an application launched elsewhere.

For Claude Code, open `/mcp` and inspect Phi's authentication state. For Cursor, Codex, or GitHub Copilot, follow that client's [quickstart](/docs) to check its configuration. Tools being connected and skills being installed are separate checks: skills teach a method; the MCP connection supplies the tools.

## Inputs or uploads are rejected

Read the `422` response's field path and message. Confirm that you used the model's own input and parameter names from its [model card](/docs/models).

| Symptom | Likely cause | What to do |
| --- | --- | --- |
| A structure address is refused | It points outside Phi's authorized files or belongs to another organization | Upload the file with the same organization's credential and use the returned address |
| A small `@file` value is refused in a URI field | The CLI read the file inline instead of producing an address | Put `@file` on the inline field, such as `target_pdb`, or upload first and fill `target_pdb_gcs_uri` |
| Chain or hotspot validation fails | Chain IDs or residue numbers do not match the input file | Read the chain summary and use author residue numbers, including insertion codes where supported |
| Uploading to a signed URL fails | The URL expired, the signed content type differs, or the upload was interrupted | Request a new URL and repeat the upload with the same content type used when requesting it |

[Input files](/docs/reference/inputs) explains the upload paths. [Hotspots and numbering](/docs/guides/hotspots-and-numbering) explains residue numbering. Uploading again and submitting a model again are different actions; only submit once the input is ready.

## The request times out or returns a server error

If you already have a job ID, read that job's status. Do not submit another model merely because the status request failed.

If a submit timed out before returning its ID, the outcome is uncertain. Inspect Work or recent jobs before replaying it. Reusing a key can start another attempt after a failed run, so do not treat it as an unconditional guarantee against more computation. The [safe automation guide](/docs/guides/safe-automation) shows how to preserve a submission journal.

For `429`, wait for the time in `Retry-After`. The client retries eligible reads automatically, within its retry budget. If those retries are exhausted, reduce request frequency before trying again. For repeated `5xx` responses, keep the job ID and response details and try a read later.

## A job stays pending or fails

Read the full status and available logs rather than submitting a duplicate:

```bash
phi --json jobs status JOB_ID
phi logs show JOB_ID
```

`PENDING` means the request was accepted and has not started yet. Repeated submission does not move the original job forward. If the status does not change, keep its ID and inspect its timeline or logs; a lack of new logs alone does not prove it failed.

For a failed job, read `error_code` and `recommended_action`. An out-of-memory error usually calls for a smaller input. A model timeout calls for reviewing the request size and that model's limits. A validation failure calls for correcting the named field. [Errors and retries](/docs/reference/errors) lists actionable failure codes.

## Credits are unavailable or a submit is refused

A `402` response can mean the balance is insufficient or a spending limit prevents the request. Read the response details. Credits held for running jobs are not available to a new submission, even before the first jobs finish.

Check [Billing](/docs/billing) for the balance, the monthly spend limit, and payment status. Repeating the same refused request does not add credits or raise the limit. Ask an organization admin to resolve the shortfall.

## A download link has expired

List the existing run's artifacts again and download with the refreshed URLs:

```bash
phi artifacts list RUN_ID
phi artifacts download RUN_ID --all --out results
```

Do not rerun the model to refresh a link. If a fresh listing returns `404`, check the environment, organization, and whether the run was deleted. If the files download but scores are absent, check which artifacts and metrics that particular model produces.

## Collect useful diagnostics

When reporting a problem through Phi's Feedback control, include the client version, API host, approximate time with time zone, job or run ID, the operation that failed, HTTP status, and a redacted error body. Say what you expected and what happened instead.

Remove API keys, authorization headers, signed URLs, and any sequences or structures you do not intend to share. Include the smallest example that reproduces an input problem. If no job ID was returned, say that explicitly so the investigation starts with the submission rather than a guessed run.

---
Source: https://dynophi.com/docs/guides/troubleshooting
