Skip to content

feat(platform): offer a failed run to a coding agent - #4965

Merged
yannickmonney merged 3 commits into
mainfrom
feat/fix-run-with-coding-agent
Oct 13, 2026
Merged

yannickmonney merged 3 commits into
mainfrom
feat/fix-run-with-coding-agent

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

A failed run's card on the run page gains Fix with your coding agent, beside Show step and Retry from this step, for the people who may change the automation (Owner, Admin, Developer — the editor's own gate). It opens the guided setup that the editor's Edit with your coding agent button opens (client tabs, the verified commands, the live "Connected" line), with a prompt that names this run and its automation:

Use the tale MCP server. The run {runId} of the automation {name} failed. Call get_docs first, then read the run with get_run and ask for its record; the failed step's failure.reason says why. Read the automation with get_automation, explain in plain words what went wrong and propose the smallest fix. Reproduce the failure with run_automation before you change anything. If the cause is outside the automation, such as a connector, a secret or a model that is not set up, tell me where in Tale to set it up, and never ask me to paste a secret. Save a fix with save_automation only after I agree, and ask me before you deploy it.

It follows the MCP server's own debug_failed_run prompt — the same steps and tool names, without its lists of connectors, secrets and models — and a test holds every tool a prompt names to the endpoint's inventory, in English, German and French.

  • One dialog, two contexts. CodingAgentDialog takes the automation to change or the run to look into; the editor's button is unchanged. Where operators turned agent sign-in off, the dialog keeps its old body: the automation's name and now the run's ID to copy, Set up MCP and the guide.
  • No bracket in the prompt. The dialog marks every bracketed part of a prompt as one to replace and says so; the run prompt asks for nothing to be filled in, so it holds none (a test pins that for every prompt that asks nothing).
  • The card takes a slot (actions) for a host's buttons, the way IssueDetail does.
  • Manual layer: AUTO-F182 and its reference row. Docs in English, German and French: the failures section of the run guide, the assistant guide, and the Connected agents steps.

The failed-run screenshot of the docs (automation-run-failed) is retaken through the capture pipeline and shows the new button. Not in this PR: an entry for the Problems list (its rows have no per-row action slot).

Proof

  • Unit (jsdom): the prompt in three languages (names the run and the automation, only real tools, no bracketed part), the dialog for both contexts and both bodies, the button on the run page for a developer and its absence for anyone else. Three mutants fail their tests: the role gate removed, brackets back in the English prompt, the run field dropped from the old body.
  • Real Chromium (new run-failure-card.browser.test.tsx, 15 tests): the card's three buttons stay inside it at 320/390/768/1280 px in English, German and French; the dialog passes an axe audit in both themes (after its fade-in); closing it with Escape returns focus to the button.
  • Live, on a real failed run (the docs capture stack, Invoice digest, a failed test run): the card shows the three buttons; Fix with your coding agent opens the dialog, whose prompt names the real run (41027bd5-…) and invoice-digest, with no replace hint; at 390 px the dialog is a bottom sheet and the prompt wraps at the id's dashes. The id on the page is the primary key of app.automation_runs, the table get_run reads through the same store.
  • A real Claude Code 2.1.296 signed in to that stack through the consent page (verified domain claude.ai) and listed it connected.
  • Not done: the prompt was not given to a model. Claude Code's throwaway config has no account login, and the owner's account is not mine to spend. What an agent does with it is covered only as far as every tool it names exists and the id is the run's key.
  • Gate on the committed tree (pinned bun 1.4.2): format, conflicts, links, manual, knip, lint, both typechecks, shared tests, UI tests, docs tests and the changed browser tests are green; the server run's one failure (a German string with ß needs a Swiss form) and the lint finding (consistent-return on a switch) were fixed in the feature commit and re-run green.

A failed run's card gains Fix with your coding agent for the people who
may change the automation. It opens the guided setup the editor's button
opens, with a prompt that names the run and its automation: the agent
reads the run's record, explains why it failed, reproduces it on the
mocks and proposes the smallest fix, asking before it saves or deploys.

The dialog takes the automation or the run as its context; where agents
may not sign in it shows the name and the run's id to hand an agent that
holds a key. The prompt holds no bracketed part, so the dialog neither
marks one nor asks to replace it. The card takes a slot for the host's
buttons. AUTO-F182 and its reference row.
The failure card's new button, in the guide to a failed run, in the
assistant guide and in the Connected agents steps, in all three
languages.
The failure card now carries Fix with your coding agent beside Show step
and Retry from this step.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant