Authentication errors
"AUTH_EXPIRED" or "AUTH_REQUIRED" errors
"AUTH_EXPIRED" or "AUTH_REQUIRED" errors
Your session token has expired or is missing.This fetches a new token and overwrites the existing config.
"CONFIG_INVALID" error
"CONFIG_INVALID" error
The config file at Or create the file manually:
~/.mage-agent/config.json is missing or malformed.Re-run login to recreate it:MCP / IDE issues
MCP tools not showing in the IDE
MCP tools not showing in the IDE
- Confirm
mage-agentis accessible from the IDE’s runtime PATH — or use an absolute path (see Installation). - Save the MCP config and restart the IDE or agent client.
- Test the server directly in a terminal:
"command not found: mage-agent" in IDE
"command not found: mage-agent" in IDE
The IDE cannot find the executable. Run:Copy the full path and use it in your IDE config:
Tools are listed but calls fail
Tools are listed but calls fail
Run login again — the MCP server may have started before credentials were saved, or the token expired during the session:Then restart the IDE to pick up fresh credentials.
Sync issues
Unexpected conflicts after syncing
Unexpected conflicts after syncing
Conflicts are detected by comparing timestamps on each side. Small clock differences between your machine and the cluster can cause false positives.Check what the conflict looks like before choosing a side:Then run
mage-agent sync and choose r (remote) or l (local) for each affected file.Files not appearing in sync-status
Files not appearing in sync-status
Only these file extensions are tracked:
.py, .sql, .r, .yaml, .yml, .md, .txt.Also check that the files are not inside a hidden directory (.git, .venv) or a __pycache__ folder — those are always excluded.Sync state file is missing or corrupted
Sync state file is missing or corrupted
The state file lives at
<local-project-dir>/.mage-agent-sync-state.json. If it is missing, mage-agent treats all files as new and will re-pull the full project on the next sync-project-to-local. Delete it intentionally only if you want a clean baseline.Enable debug logging
Add--log-level DEBUG to any command to see full request/response traces: