plandex-ai/plandex · error
Error getting pending builds by path: %v
Error message
Error getting pending builds by path: %v
What it means
After a tell stream completes, queuePendingBuilds calls active.PendingBuildsByPath(orgId, userId, convo) to compute which file paths still need builds. If that call returns an error, it is logged, sent to error tracking, and delivered to the client as a 500 ApiError with message "Error getting pending builds by path: %v". The tell response itself succeeded, but the follow-up build queueing could not be determined.
Source
Thrown at app/server/model/plan/tell_build_pending.go:45
}
defer func() {
if r := recover(); r != nil {
log.Printf("panic in queuePendingBuilds: %v\n%s", r, debug.Stack())
go notify.NotifyErr(notify.SeverityError, fmt.Errorf("error getting pending builds by path: %v", r))
active.StreamDoneCh <- &shared.ApiError{
Type: shared.ApiErrorTypeOther,
Status: http.StatusInternalServerError,
Msg: fmt.Sprintf("Error getting pending builds by path: %v\n%s", r, debug.Stack()),
}
}
}()
pendingBuildsByPath, err := active.PendingBuildsByPath(auth.OrgId, auth.User.Id, state.convo)
if err != nil {
log.Printf("Error getting pending builds by path: %v\n", err)
go notify.NotifyErr(notify.SeverityError, fmt.Errorf("error getting pending builds by path: %v", err))
active.StreamDoneCh <- &shared.ApiError{
Type: shared.ApiErrorTypeOther,
Status: http.StatusInternalServerError,
Msg: fmt.Sprintf("Error getting pending builds by path: %v", err),
}
return
}
if len(pendingBuildsByPath) == 0 {
log.Println("Tell plan: no pending builds")
return
}
log.Printf("Tell plan: found %d pending builds\n", len(pendingBuildsByPath))
// spew.Dump(pendingBuildsByPath)
buildState := &activeBuildStreamState{View on GitHub (pinned to e2d772072e)
Solutions
- Check server logs for the log line 'Error getting pending builds by path' — the wrapped error names the actual failing subsystem (DB, context map, etc.).
- Verify database integrity for the plan's context entries; reload/lock the plan's context if files changed externally.
- Retry the tell request once the underlying cause is fixed; pending builds are recomputed each run.
- If caused by concurrent updates, avoid updating plan context from another session while a tell stream is active.
Defensive patterns
Strategy: retry
Validate before calling
// before starting a tell stream, confirm plan context entries resolve
for path := range plan.ContextMap() {
if _, err := os.Stat(path); err != nil {
return fmt.Errorf("context file missing before tell: %s", path)
}
} Try / catch
apiErr := <-active.StreamDoneCh
if strings.HasPrefix(apiErr.Msg, "Error getting pending builds by path") && !strings.Contains(apiErr.Msg, "panic") {
// non-panic DB/context error: safe to retry the tell request after the DB recovers
return retryTell(planId, branch)
} Prevention
- Avoid updating plan context from another session while a tell stream is running.
- Monitor DB connectivity; most cases are transient DB failures.
- Re-sync context map if files were changed outside Plandex mid-stream.
- Check server logs for the matching 'Error getting pending builds by path' line with the root cause.
When it happens
Trigger: PendingBuildsByPath fails while processing the end of a tell plan — e.g. errors reading context map / context tokens, DB lookups for context, or computing pending builds from the convo history during execTellPlan.
Common situations: Corrupt or missing context entries in the DB (files removed externally while plan was streaming); DB connectivity blips mid-stream; large contexts exceeding internal limits; mismatched context map state after concurrent updates to the same plan.
Related errors
- error removing contexts: %v
- Error error updating contexts:
- Error deleting contexts:
- error invalidating conflicted results: %v
- error adding plan context tokens: %v
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/1a50874eafc37a1e.
Report an issue: GitHub.