#446

A failed task title call fails the whole task

Openlalith0407opened 24d ago

Affected Component

Core Services (Frontend UI/Backend API)

Describe the bug

GetTaskTitle (backend/pkg/providers/provider.go:339) asks the model for a task title, and any error is fatal. NewTaskWorker (backend/pkg/controller/task.go:61-64) returns it and no task is created. By then the flow already has its image, its title and a running sandbox.

The title is only shown in the UI, so a rate limit on it shouldn't stop the run.

Also, the error messages in that function say "flow title", so the log reads failed to get task title: failed to get flow title: ....

Possibly the same thing users saw in #85 ("Just sits at Untitled and 'The flow is starting'").

Steps to Reproduce

  1. Use a provider on a low free-tier limit (we were on Gemini free tier, 15 requests/min).
  2. Start a flow, or two back to back.
  3. When the task title call gets a 429, the flow ends with 0 tasks.

Logs

level=error msg="failed to process input" component=worker error="failed to create task for flow 2: failed to create task worker: failed to get task title: failed to get flow title: Error 429, Message: You exceeded your current quota ..."

Expected Behavior

If the title can't be generated, use the user's input as the task title and keep going.

System Configuration

PentAGI 2.2.0-ce (843dfeb), Docker 29.9.1, Linux. Seen with Gemini (gemini-3.1-flash-lite); also reproduced with OpenAI using a local proxy that returns 429 for the title request.

Activity

1
XinwangTao24d ago

Confirmed — a 429 on the title call nuking the entire flow is a real availability bug, and the linked fix (fall back to the user input as title) is the right direction since the title is purely cosmetic in the UI while the sandbox and image are already provisioned. Two follow-ups worth considering: (1) degrade the title generation to best-effort/async so a transient rate limit never sits on the critical task-creation path again; (2) fix the misleading error message while you are in there — reading "failed to get flow title" inside "failed to get task title" made this much harder to diagnose. Also note the title call is a nice candidate for a small retry-with-backoff since free-tier providers 429 constantly.