Docs
中文 EN

Troubleshooting & Runtime Diagnostics

CONTENTS

When investigating failures, start with CORDIS_LOG=debug mizar exec "ping" to inspect runtime traces, or match your symptom below.

1. Routing, Credentials & TLS Networks

SymptomCauseFix
no LLM provider or route configuredNo env credentials, no models.json, and no --provider mockExport API_KEY + BASE_URL + MODEL, or run mizar --provider mock --model mock-v1
unknown provider "<name>"--provider matches neither built-ins nor models.json keysVerify models.json provider key, or add --protocol and --base-url
Corporate HTTPS proxy TLS verification errorPrivate CA root missing from Rust reqwest client trust storeExport SSL_CERT_FILE, CURL_CA_BUNDLE, REQUESTS_CA_BUNDLE, or NODE_EXTRA_CA_CERTS pointing to your .pem bundle
Slow startup in air-gapped networksBackground GitHub release check timing out (6s)Set export MIZAR_OFFLINE=1 or export MIZAR_SKIP_VERSION_CHECK=1

2. Gateway 400s, Truncation & Loops

When routing through OneAPI, LiteLLM, vLLM, Ollama, or custom OpenAI-compatible proxies:

  • Gateway rejects developer role: Set "supportsDeveloperRole": false inside compat.
  • Gateway rejects stream_options / include_usage: Set "supportsUsageInStreaming": false.
  • Gateway rejects max_completion_tokens or max_output_tokens: Set "maxTokensField": "max_tokens" and "supportsMaxOutputTokens": false.
  • Reasoning endpoint rejects temperature / reasoning_effort: Disable via "supportsTemperature": false or "supportsReasoningEffort": false.
  • exec exits 1 with code=max_tokens: Response hit output token ceiling; raise --max-tokens or models[].maxTokens.
  • repeat-tool-guard alerts fire repeatedly: Press Ctrl+T to inspect /trace Hotspots & Inspector for repeated validation errors or missing paths.

3. JSONL Persistence, Blobs & Tool Installation

  • Startup or exit persistence errors (code=storage / TUI error banner): Check permissions on ~/.mizar/sessions, redirect via MIZAR_SESSIONS_DIR or settings.json sessionsDir, or run with --no-persist / MIZAR_SESSIONS_DIR=memory in ephemeral environments.
  • Missing image blob warning on --resume: If a file under blobs/<sha256> was deleted, the tolerant JSONL loader warns and strips only the missing attachment while recovering the rest of the session cleanly.
  • Unpaired tool_call from a past crash: /tree forking and -r <id> resume automatically synthesize healing results on replay.
  • Missing rg or slow GitHub download: Interactive TUI auto-installs rg/fd on demand (or run mizar install-tools --force); headless exec uses only locally available binaries. Slow/stalled downloads fall back to https://ghfast.top by default; set MIZAR_OFFLINE=1 in air-gapped networks.

4. MCP, codemode & Instructions

  • Only 4 tools appear by default, or MCP tools are hidden from top-level schemas: MinimalCoding exposes read, bash, edit, and write by default, and codemode stays dormant unless activated via --tools codemode, codemode.enabled, or MCP codemode servers (autoEnableCodemode: true). Inspect live tool tiers with /tools and server states with /mcp, or set "exposure": "direct" selectively in mcp.json.
  • codemode 120s timeout: Long builds/test suites inside a JS script should invoke standalone bash (up to 600s) or raise codemode.timeoutMs in settings.json. To turn off codemode, add "codemode" to disabledPlugins.
  • Subdirectory AGENTS.md edit not visible mid-session: mizar-instructions loads statically at startup for KV-cache stability. Restart the session and run /instructions to verify loaded files and maxBytes eviction order.

5. Terminal Colors, Clipboard & Selection

  • Degraded colors in terminal/CI: Ensure COLORTERM=truecolor is exported or switch via /theme ansi16; hide Nerd Font icons with MIZAR_TUI_PILL_ICONS=0.
  • Cannot drag-select text across Fullscreen UI: Press F2 (/mouse) to pause in-app mouse capture for native selection, or run --inline (/view inline) to flush turns to native terminal scrollback.
  • Red JSON config banner on startup: Mizar requires strict JSON — strip // comments and trailing commas from settings.json, models.json, and mcp.json.

Search Mizar Docs