# CodexAuthExpiredError

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/integrations/openai_codex/CodexAuthExpiredError)

Raised when a stored ChatGPT token cannot be refreshed.

Distinct from a missing token (`FileNotFoundError`): a token exists on
disk but its refresh token was revoked or expired, so an automatic
refresh failed and the user must sign in again. `create_model` maps this
to a `MissingCredentialsError` that points at `/auth`.

## Signature

```python
CodexAuthExpiredError()
```

## Extends

- `RuntimeError`

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/7794b61a6e76230e8c7a49bdce808b3728305914/libs/code/deepagents_code/integrations/openai_codex.py#L218)