nanobot troubleshooting table

Corresponding source

Failure boundarySource
Entry points and configurationnanobot/cli/commands.py, nanobot/config/loader.py, nanobot/config/paths.py
Agent Loop and Runnernanobot/agent/loop.py, nanobot/agent/runner.py
Provider retry/fallbacknanobot/providers/base.py, nanobot/providers/fallback_provider.py
Tool discovery/validationnanobot/agent/tools/loader.py, nanobot/agent/tools/registry.py
Session and atomic persistencenanobot/session/manager.py
Channel/API/WebUInanobot/channels/, nanobot/api/server.py, nanobot/webui/, webui/src/

Five diagnostic questions

Answer these five questions first:

  1. Did the request reach the entry point? Did CLI, API, or Channel actually construct a request?
  2. Is this the intended Session? Do the actual Session key and workspace match expectations?
  3. At which layer did it stop? AgentLoop state, Runner, Provider, Tool, Channel, or UI?
  4. What does each kind of evidence establish? What do logs, state trace, Runtime Events, Session files, and wire frames each prove?
  5. What is the smallest reproduction? Can you remove WebUI, the real Channel, or unnecessary Tools?
flowchart LR
    A["Entry point"] --> B["AgentLoop"]
    B --> C["AgentRunner"]
    C --> D["Provider / Tool"]
    B --> E["Session"]
    B --> F["Outbound / Event"]
    F --> G["Channel / API / SDK / WebUI"]

Common symptoms

SymptomFirst boundary to inspectEvidence to examineCommon causesNext step
Command will not startCLI and configuration loadingtraceback, actual configuration path, Python environmentmissing dependency, configuration parse failure, missing ${VAR}, occupied portRun minimal nanobot --help or status, then inspect nanobot/config/loader.py
DeepSeek returns 401/403Provider credentialsHTTP status and active Provider; never print the keyvariable absent from this process, invalid key, wrong Provider selectedCheck only that DEEPSEEK_API_KEY exists, then verify preset and Provider
Provider returns 429/5xxProvider retry and fallbackretry log, _retry_wait, final errorrate limiting, transient outage, unsuitable retry policyDistinguish retry from fallback; read providers/base.py and fallback_provider.py
Request never endsRunner and timeout layersstate trace, last delta, timeout nameTool did not return, idle stream, persistent Goal, outer LLM timeoutSeparate API timeout, LLM timeout, and stream-idle timeout
Tool is absent from the model schemaTool discovery and Registryregistered Tool list and loader logsundiscovered module/entry point, name collision, invalid instance, scope mismatchInspect loader.py and test_tool_loader_*
Tool is called but arguments failTool schemaarguments and validation errormismatch between parameters and execution signature, invalid required/type/additional fieldsReproduce with tests adjacent to ToolRegistry.prepare_call() or Tool.validate_params()
Tool succeeds but the model does not see the resultRunner feedbacktool-result message, call ID, truncation metadataserialization failure, call-ID mismatch, result over character limitInspect AgentRunner’s Tool-result assembly
MCP fails to startTransport connectioncommand or URL, stderr, connection logsWindows command normalization, wrong cwd/env, service not running, SSRF blockVerify the stdio process or HTTP endpoint independently, then read mcp.py
MCP connects but exposes no ToolsenabledTools and registrationserver Tool list and wrapped namesenabledTools=[], name allowlist mismatch, incomplete initializationCompare raw names with wrapped mcp_<server>_<tool> names
New message cannot see old contextSession key and replayactual key, Session JSONL, loaded messageschanged Channel/chat, override, unified Session, compaction or history limitInspect session/keys.py and SessionManager
Session file is corrupted or incompleteSAVEtemporary file, original file, persistence-error logprocess failure, disk error, non-atomic path, incorrect concurrent usePreserve evidence and do not overwrite manually; inspect atomic-save tests
Context is wrong after /stopCancellation and checkpointcancellation logs, checkpoint, end of Sessioncancellation at Tool/Provider boundary, restore failureInspect test_task_cancel.py and test_stop_preserves_context.py
CLI works but Channel does not replyOutbound deliveryOutboundMessage, ChannelManager retry logsChannel configuration or credentials, bad routing, platform API failureIsolate core with a direct call or fake Channel
Final reply exists but streaming progress does notHook and Channel configurationcallback presence and metadatamissing _wants_stream, sendProgress=false, no Channel delta implementationInspect progress_hook.py and the Channel’s send_delta()
Streamed content is duplicated or merged incorrectlySegments and coalescing_stream_id, _stream_end, sequencemerged segments, replayed deltas, faulty UI reducerTrace from WebSocket frame through React state
WebUI remains “running”Runtime Event and WebSocketTurnRunStatusChanged, TurnCompleted, framecompletion not published, subscriber failure, bad disconnect/replay stateConfirm core finished, then inspect coordinator and adapter
Configuration changed but behavior did notConfiguration to runtime snapshotactual loaded path, active preset and modelwrong file, preset override, no refresh/restart, bad aliasUse the configuration index
File Tool rejects a path outside workspaceWorkspace policyresolved path and access moderestrictToWorkspace, path escape, or symlink checkDo not bypass it; determine whether the task should remain inside workspace
Sandbox is configured on Windows but commands are not isolatedOS sandboxstartup warning, sandbox Provider and enforced flagsbwrap path depends on Linux/container support; Windows lacks this execution boundaryTreat it as unsandboxed; use an external container/VM or lower-privilege environment
Web fetch is deniedSSRFURL, resolved IP, redirect chainlocalhost/private/reserved address, DNS result, or blocked redirectDo not disable global protection; add only a reviewed, minimal trusted CIDR
Memory does not changeMemory and trigger conditionsMemory files, Tool Call, Dream/Cron logsno Memory Tool invocation, Dream disabled/not triggered, wrong workspaceDistinguish Session history from Memory
Cron does not triggerScheduling and timezonejob store, next run, timezone, statusdisabled job, wrong timezone, Gateway not persistent, protection ruleInspect CronService independently before changing AgentRunner

Minimum isolation order

WebUI problem
  → Verify core with SDK or direct call
  → Inspect Runtime Event or progress callback
  → Inspect WebSocket frame
  → Inspect React state last
 
Channel problem
  → Verify Provider and Agent with CLI or direct call
  → Construct one InboundMessage
  → Inspect OutboundMessage
  → Contact the real platform last
 
Tool problem
  → Instantiate the Tool directly
  → Validate its schema
  → Execute through ToolRegistry
  → Trigger a Tool Call with a fake Provider
  → Make a real-model smoke test last

Avoid these diagnostic mistakes

  • Do not paste keys, complete configurations, or credential-bearing URLs into logs.
  • Do not begin with WebUI, a real Channel, MCP, and several Tools all enabled.
  • Do not start editing frontend components merely because an error appears in the UI.
  • Do not use infinite retry to hide authentication, schema, or deterministic logic failures.
  • Do not disable workspace or SSRF protection to make a test pass.
  • Do not edit a Session file and then continue treating it as evidence of the original failure.

When evidence remains insufficient

Record explicitly:

  • minimum input;
  • entry point and Session key, without sensitive values;
  • final AgentLoop state;
  • active Provider and model;
  • whether a Tool Call occurred;
  • last observable event;
  • whether a fake Provider or direct call reproduces it.

Then return to Logging, Runtime Events, and testing strategy to choose the next evidence layer.

Return to Quick reference.