{"record":{"id":"392c048a26b4e8a1","repo":"vxcontrol/pentagi","slug":"failed-to-get-active-subtask-description-w","errorCode":null,"errorMessage":"failed to get active subtask description: %w","messagePattern":"failed to get active subtask description: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"backend/pkg/tools/flow_manager.go","lineNumber":143,"sourceCode":"\tfmt.Fprintf(sb, \"Subtasks — total: %d, running: %d, waiting: %d, finished: %d, failed: %d, planned: %d\\n\",\n\t\tlen(subtasks), stCounts[\"running\"], stCounts[\"waiting\"], stCounts[\"finished\"], stCounts[\"failed\"], stCounts[\"created\"])\n\n\tif activeTask != nil {\n\t\tfmt.Fprintf(sb, \"\\nActive task:    ID=%-6d | %-8s | %s\\n\", activeTask.ID, activeTask.Status, activeTask.Title)\n\t\tif verbose && activeTask.Input != \"\" {\n\t\t\tinput, err := t.getInputText(ctx, activeTask.Input)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", fmt.Errorf(\"failed to get active task input: %w\", err)\n\t\t\t}\n\t\t\tfmt.Fprintf(sb, \"  Input: %s\\n\", input)\n\t\t}\n\t}\n\tif activeST != nil {\n\t\tfmt.Fprintf(sb, \"Active subtask: ID=%-6d | %-8s | %s\\n\", activeST.ID, activeST.Status, activeST.Title)\n\t\tif verbose && activeST.Description != \"\" {\n\t\t\tdescription, err := t.getDescriptionText(ctx, activeST.Description)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", fmt.Errorf(\"failed to get active subtask description: %w\", err)\n\t\t\t}\n\t\t\tfmt.Fprintf(sb, \"  Description: %s\\n\", description)\n\t\t}\n\t}\n\n\tif len(tasks) == 0 {\n\t\tfmt.Fprintf(sb, \"\\nNo tasks yet. Flow is waiting for first input.\\n\")\n\t}\n\n\tsummary := sb.String()\n\tif t.summarizer != nil && len(summary) > summaryLimit {\n\t\tsummary, err = t.summarizer(ctx, truncateText(summary, summarizationLimit))\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"failed to summarize summary: %w\", err)\n\t\t}\n\t}\n\n\treturn summary, nil","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/flow_manager.go#L125-L161","documentation":"Thrown in buildSummary (backend/pkg/tools/flow_manager.go:143) when rendering the active subtask's Description in verbose mode. The description goes through t.getDescriptionText, which calls the LLM summarizer when the description exceeds 2*descriptionLimit (8 KB); this error wraps that summarizer failure. The DB row itself was read fine — only the description compression step failed.","triggerScenarios":"get_flow_status with detail='summary' and verbose=true while a subtask is running/waiting, its Description exceeds 8 KB, and the t.summarizer callback errors (provider outage, auth failure, rate limit, context cancellation).","commonSituations":"Expired or missing LLM API key for the configured summarizer provider; provider 429 rate limiting during parallel agent activity; long attacker-style subtask descriptions generated by the Developer agent exceeding the summarization threshold; local Ollama server stopped.","solutions":["Check the underlying summarizer error and provider health (API key, quota, endpoint) in the observability logs.","Retry the call, or use verbose=false so only title/status are printed without description summarization.","Trim subtask descriptions (patch_flow_subtasks) so they stay under 8 KB and bypass the summarizer.","Set the summarizer to nil / fix its config to fall back to truncateText truncation instead of LLM summarization."],"exampleFix":"// before\ndescription, err := t.getDescriptionText(ctx, activeST.Description)\nif err != nil {\n\treturn \"\", fmt.Errorf(\"failed to get active subtask description: %w\", err)\n}\n// after: fall back to raw truncation\nrendered, err := t.getDescriptionText(ctx, activeST.Description)\nif err != nil {\n\trendered = truncateText(activeST.Description, descriptionLimit)\n}\ndescription = rendered","handlingStrategy":"fallback","validationCode":"// avoid the summarizer path when the description is small enough\nif len(subtaskDescription) <= 2*descriptionLimit {\n\tverbose = true // safe: only local truncation happens\n} else if summarizerUnavailable(ctx) {\n\tverbose = false\n}","typeGuard":null,"tryCatchPattern":"// Go: fall back to non-verbose summary on this error\nout, err := tool.Handle(ctx, \"get_flow_status\", verboseSummaryArgs)\nif err != nil && strings.Contains(err.Error(), \"failed to get active subtask description\") {\n\tout, err = tool.Handle(ctx, \"get_flow_status\", summaryArgs)\n}","preventionTips":["Keep subtask descriptions concise (<8 KB) when planning via patch_flow_subtasks.","Monitor summarizer provider availability (health probe / rate-limit budget).","Retry the tool call on transient LLM errors instead of aborting the agent chain.","Prefer verbose=false when only task/subtask status is needed."],"tags":["llm","summarization","tool","flow-status"],"backgroundTag":"llm-summarization-failed","analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}