Commit Graph
2 Commits
Author SHA1 Message Date
Aaditya f5c8b346e3 fix(workflow): workflow_run creates a ready workflow instead of a fake running one (#4612)
workflow_run stored its workflow with status 'running' and a startedAt,
and returned status 'running' with a fabricated `stages * 30s`
estimate, but dispatched nothing. workflow_execute then refused the
workflow ("Workflow already running") and workflow_delete refused it
("Cannot delete running workflow"), so it stayed stuck unless
cancelled.

It now saves the workflow as 'ready', as workflow_create does, with no
startedAt. It returns status 'ready', estimatedDuration 'unknown' and a
nextStep note: workflow_execute starts the workflow, and its task
steps need config.agentId or options.defaultAgentId. options still flow
into variables, so a defaultAgentId passed to workflow_run is used by
workflow_execute. dryRun is unchanged.

The `workflow run` CLI says "Workflow created" and prints how to start
it. workflow-cli-tool-shape's list case now expects the 'ready' status.

Fixes #4609
2026-11-01 10:25:56 -05:00
Rudy CelekliandClaude Sonnet 5.5 28a9fefaa3 fix(workflow): list, status, stop and run read the shape and errors the workflow tools return
The workflow MCP tools return { error } instead of throwing and a different
result shape than the CLI read. Against the real tools: 'workflow list'
always printed no workflows (the CLI sends status 'all', which the tool
treated as a literal filter), 'workflow status' crashed on a missing metrics
block, and 'workflow stop' printed "stopped" for a missing or finished
workflow. Read the fields the tools return and report tool errors.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-18 01:03:28 -04:00