Coding Agents
Troubleshooting
Reference and fixes for coding-agent gateway routing, drift, keys, and logout.
Use this page to fix routing, key, and config conflicts. See Model mapping for aliases, limits, and defaults.
Gateway key resolution
inf <agent> on resolves a gateway key in this order:
INFERENCE_API_KEYenvironment variable (never persisted).- The project key stored by
inf auth set-key. - A coding-agent key minted on a previous run (stored in
~/.inf/config.json). - If none of the above, an authenticated session mints one project-scoped key.
One key is shared by all five agents.
If you have no session or key, the command exits with code 1. Use one of these options:
inf auth logininf auth set-key <key>- export
INFERENCE_API_KEY
See Authentication for the base credential model.
Drift and conflict scenarios
| Scenario | status | off |
|---|---|---|
Untouched since on | active | restore original (or delete the key) |
| You edited an owned field | modified | leave your value, report it |
| You deleted an owned field | missing | nothing to do, report it |
| You added unrelated keys | not reported | untouched |
| Target file deleted | missing file | skip automatic restore, keep state and backup |
on run twice with different flags | active (new value) | restores the pre-first-on original |
| Never connected | connected: false | "not connected", exit 0 |
inf auth logout and your agents
Logout disconnects every connected agent before it clears credentials.
| Flag | Effect |
|---|---|
--keep-coding-agents | leave all agent gateway config in place; print the files that still hold a key |
--revoke-coding-agent-key | revoke the minted coding-agent key before logout |
The two flags are mutually exclusive.
inf auth logoutinf auth logout --keep-coding-agentsinf auth logout --revoke-coding-agent-keyIf a harness could not be fully disconnected, logout warns and names the files.
Revoke a coding-agent key
Minted keys are named inf-coding-agents-<timestamp>. Use inf api-key list to find the id, then revoke it.
inf api-key list
inf api-key revoke <id>Recover from an interrupted on
Each file is written atomically. A multi-file update can still stop between files. Re-run inf <agent> on. It reuses the stored key and finishes the update.
inf claude onConfig directory moved
If CLAUDE_CONFIG_DIR, CODEX_HOME, or XDG_CONFIG_HOME changes the target between runs, status, on, and off stop and show both paths.
Restore the original root setting. Run inf <agent> off. Then change the root and run inf <agent> on again.
There is no force flag for this case.
--json reference
status --json returns harness, connected, models, and targets. Every target has path, missingFile, and per-field id and state.
on --json adds keySource and a masked keyPreview. off --json adds conflict and retained-state fields. No JSON output contains a raw key.
inf claude status --json{
"harness": "claude",
"connected": true,
"models": {
"main": "kimi-k3-fast",
"opus": "kimi-k3-fast",
"sonnet": "kimi-k3-fast",
"haiku": "deepseek-v4-flash-0731",
"fable": "kimi-k3-fast",
"subagents": "deepseek-v4-flash-0731"
},
"targets": [
{
"path": "/Users/you/.claude/settings.json",
"missingFile": false,
"fields": [
{ "id": "model", "state": "active" }
]
}
]
}Upgraded from an older CLI that wrote glm-5.2
The default for Claude Opus and Sonnet is now kimi-k3-fast. An older connection can still show glm-5.2 in those slots. The gateway continues to serve that model, so the connection still works.
An upgrade does not change existing connections. Re-run inf claude on, or pass --opus and --sonnet, to use the new default. off can still restore the values from before your first on.
glm-5.2 is no longer accepted as a --model or slot value on on. Use glm-5.2-fast, kimi-k3-fast, or deepseek-v4-flash-0731.