{"record":{"id":"a77578ab746e5646","repo":"sipeed/picoclaw","slug":"error-processing-message-w","errorCode":null,"errorMessage":"error processing message: %w","messagePattern":"error processing message: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/picoclaw/internal/agent/helpers.go","lineNumber":81,"sourceCode":"\tskillsInfo, ok := startupInfo[\"skills\"].(map[string]any)\n\tif !ok {\n\t\tskillsInfo = nil\n\t}\n\tlogFields := map[string]any{}\n\tif toolsInfo != nil {\n\t\tlogFields[\"tools_count\"] = toolsInfo[\"count\"]\n\t}\n\tif skillsInfo != nil {\n\t\tlogFields[\"skills_total\"] = skillsInfo[\"total\"]\n\t\tlogFields[\"skills_available\"] = skillsInfo[\"available\"]\n\t}\n\tlogger.InfoCF(\"agent\", \"Agent initialized\", logFields)\n\n\tif message != \"\" {\n\t\tctx := context.Background()\n\t\tresponse, err := agentLoop.ProcessDirect(ctx, message, sessionKey)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error processing message: %w\", err)\n\t\t}\n\t\tfmt.Printf(\"\\n%s %s\\n\", internal.Logo, response)\n\t\treturn nil\n\t}\n\n\tfmt.Printf(\"%s Interactive mode (Ctrl+C to exit)\\n\\n\", internal.Logo)\n\tinteractiveMode(agentLoop, sessionKey)\n\n\treturn nil\n}\n\nfunc interactiveMode(agentLoop *agent.AgentLoop, sessionKey string) {\n\tprompt := fmt.Sprintf(\"%s You: \", internal.Logo)\n\n\trl, err := readline.NewEx(&readline.Config{\n\t\tPrompt:          prompt,\n\t\tHistoryFile:     filepath.Join(os.TempDir(), \".picoclaw_history\"),\n\t\tHistoryLimit:    100,","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/picoclaw/internal/agent/helpers.go#L63-L99","documentation":"Context wrapper in agentCmd around agentLoop.ProcessDirect: the interactive/one-shot message was submitted to an already-initialized agent loop, but the turn failed mid-processing — the wrapped cause may be an LLM/provider call failure, context cancellation, or an internal agent error. The agent, bus, and provider were all set up successfully before this point.","triggerScenarios":"Thrown at cmd/picoclaw/internal/agent/helpers.go:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error to tell provider/network failures from agent-internal ones","Check that the model endpoint is reachable and credentials are valid","Retry the message — transient provider errors (rate limits, timeouts) often clear","For one-shot use, wrap the call site in a retry with a small backoff"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","contentChangedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}