# ox doctor (/docs/cli/commands/doctor)



ox doctor [#ox-doctor]

Run diagnostics on your SageOx setup to identify configuration issues, verify authentication, and check repository health.

Usage [#usage]

<Terminal>
  <TerminalCommand>
    ox doctor [--verbose]
  </TerminalCommand>
</Terminal>

What It Checks [#what-it-checks]

Authentication [#authentication]

* Valid session token
* Token expiration
* Correct permissions

Repository Registration [#repository-registration]

* Repository is registered with SageOx
* Local configuration matches server
* Repository exists on platform

Context Injection [#context-injection]

* Context injection is configured
* CLAUDE.md and context files are set up
* Context can be retrieved from server

Output [#output]

| Symbol   | Meaning            |
| -------- | ------------------ |
| `[OK]`   | Check passed       |
| `[WARN]` | Non-critical issue |
| `[FAIL]` | Critical issue     |

<Terminal title="ox doctor">
  <TerminalOutput>
    SageOx Doctor
  </TerminalOutput>

  <TerminalOutput>
    \=============
  </TerminalOutput>

  <TerminalOutput />

  <TerminalOutput>
    Authentication
  </TerminalOutput>

  <TerminalOutput>
      \[OK] Logged in as 

    [user@example.com](mailto:user@example.com)
  </TerminalOutput>

  <TerminalOutput />

  <TerminalOutput>
    Repository
  </TerminalOutput>

  <TerminalOutput>
      \[OK] Repo registered: my-project
  </TerminalOutput>

  <TerminalOutput />

  <TerminalOutput>
    Context Injection
  </TerminalOutput>

  <TerminalOutput>
      \[OK] Context injection enabled
  </TerminalOutput>

  <TerminalOutput />

  <TerminalOutput>
    All checks passed.
  </TerminalOutput>
</Terminal>

Verbose Mode [#verbose-mode]

<Terminal>
  <TerminalCommand>
    ox doctor --verbose
  </TerminalCommand>
</Terminal>

Shows config paths, API endpoints, and full server responses.

Exit Codes [#exit-codes]

| Code | Meaning                   |
| ---- | ------------------------- |
| 0    | All checks passed         |
| 1    | One or more checks failed |

Common Issues [#common-issues]

**Not Authenticated** - Run `ox login`

**Repository Not Registered** - Run `ox init`

**Expired Token** - Run `ox login`

Related Commands [#related-commands]

* [ox login](/docs/cli/auth) - Authenticate with SageOx
* [ox init](/docs/cli/init) - Initialize repository
* [ox prime](/docs/cli/prime) - Context injection for agents
