Skip to content

Agent cannot see the run the user started, so it cannot say why it failed or why the result is empty #9420

Description

@eugenegujing

Feature Summary

When the user clicks Run, the agent learns nothing about that run. It only knows about operators it executed itself through its executeOperator tool. So the two questions a new user most often asks it have no answer.

The user's run The user asks What the agent has today
Hits an error in one operator "Why did this fail?" No error for that operator
Completes with no error, result is empty "Why is my result empty?" No row counts, so it cannot see that the file scan produced 0 rows

In both cases the agent either guesses or runs the operators again with its own tool to find out.

Example for the first row on main. Add a Python UDF whose code raises ValueError("bad row"), click Run, wait for the error to show in the console (the operator pauses and the run stays Running), then ask the agent "why did my workflow fail?". The context sent to the model has no error under that operator.

Example for the second row, reported by @zyratlo in #9377. Create a dataset with no file, select it in a file scan, click Run. The run completes, every operator shows 0 rows on the canvas, and the agent cannot tell which operator is the cause.

The system prompt (prompts.ts, "Refine or fix operator in place") already tells the model what to do with an execution error. The information never reaches it.

Where the data is today

Data Where it lives Reachable by the agent service
Fatal errors of the last run Computing unit memory, sent to the browser over the websocket, held in ExecuteWorkflowService No. Not persisted, no REST endpoint
Console messages per operator Persisted to Iceberg, held in the browser in WorkflowConsoleService No. No REST endpoint reads them back
Input and output row counts per operator Sent to the browser over the websocket and held in WorkflowStatusService. Also persisted Yes, through GET /api/executions/{wid}/stats/{eid}, which the agent does not call

The AI Fix tab from #8637 reads the first two from the browser. The agent has none of the three in its context.

Proposed Solution or Design

Send a report on the user's last run with each prompt, once the run has finished or one of its operators has logged an error. The report carries the errors and each operator's state and row counts, shown under the matching operator in the agent's context, and only a run the user started from the browser is reported (details in #9377, change 1).

Affected Area

Workflow UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions