plandex-ai/plandex · error
Error getting plan summaries:
Error message
Error getting plan summaries:
What it means
GetPlanStatusHandler returns this 500 when db.GetPlanSummaries fails to fetch summaries for the plan's convo messages. The convo itself loaded fine; the failure is in the summaries lookup (planId + convo message IDs). The database error is appended to the response and logged.
Source
Thrown at app/server/handlers/plans_convo.go:144
http.Error(w, "Error getting plan convo: "+err.Error(), http.StatusInternalServerError)
return
}
if len(convoMessages) == 0 {
log.Println("No messages found for plan")
return
}
convoMessageIds := make([]string, len(convoMessages))
for i, convoMessage := range convoMessages {
convoMessageIds[i] = convoMessage.Id
}
summmaries, err := db.GetPlanSummaries(planId, convoMessageIds)
if err != nil {
log.Println("Error getting plan summaries: ", err)
http.Error(w, "Error getting plan summaries: "+err.Error(), http.StatusInternalServerError)
return
}
if len(summmaries) == 0 {
log.Println("No summaries found for plan")
return
}
latestSummary := summmaries[len(summmaries)-1]
bytes := []byte(latestSummary.Summary)
w.Write(bytes)
log.Println("Successfully processed request for GetPlanStatusHandler")
}
View on GitHub (pinned to e2d772072e)
Solutions
- Check the server log for the underlying GetPlanSummaries error
- Verify database connectivity and that recent migrations (plan_summaries schema) were applied
- Check whether the convo is extremely large, making the ID query slow/oversized; add batching if so
- Retry the request to rule out a transient DB error
Defensive patterns
Strategy: retry
Validate before calling
const convo = await listPlanConvo(planId, branch); if (!convo.length) return null; // no messages means no summaries; skip status call
Try / catch
try {
const status = await getPlanStatus(planId, branch);
} catch (e) {
if (/Error getting plan summaries/.test(e.message)) {
return withBackoff(() => getPlanStatus(planId, branch), 3);
}
throw e;
} Prevention
- Ensure DB migrations for plan_summaries are applied on every deploy
- Cap or batch convo size before status queries
- Retry transient DB 500s with backoff
- Alert on 'Error getting plan summaries' log occurrences
When it happens
Trigger: GET plan status with a non-empty convo where the summaries query errors — database connection failure, malformed/oversized ID list, or a summaries table/schema mismatch after a version upgrade.
Common situations: Postgres outage or pool exhaustion; schema migration not applied so plan_summaries table/columns are missing; very long conversations producing large IN-clause queries that time out.
Related errors
- Error updating plan tokens:
- Error getting plan convo:
- Error deleting draft plans:
- error getting current plan state: %v
- error getting current plan state: %v
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/48ae3d4e5706499b.
Report an issue: GitHub.