Repository navigation
fix(platform): end the dead ends after a task goes to an agent - #4017
Merged
Merged
Conversation
A Member who handed work to a project agent met a dead end at every step: the assignee picker sent them to an Agents tab they cannot change and warned against every agent, assigning did not start the agent and nothing said so, and a run that failed for good stayed silent: a red dot and a clamped line of the harness's own English, the task still In progress. - A run that fails for good is announced: `agent_run_failed` rings the starter and the task's unmuted watchers who can still open the project (under Agent escalations; an email when a mailbox is connected), and a new run marks it read. The retry job retires every run it refuses for good (budget spent, agent gone, starter's rights, circuit breaker, busy agent) and tells once; the sweeps stamp their failure code. - The task explains a final failure by what it means and who can fix it, with Retry; Details keeps what the run reported. The run card reads a failure as pending only while an armed retry is coming (migration 0142) and steps aside for a newer refused start. - Every write that changes a run hints its task, so the 2 s poll is gone; unread notices are indexed by task for the dismissal a kick runs (migration 0143). - The assignee picker offers editors "Create an agent..." in place and assigns what it creates; everyone else is told who can add one; the coding-harness warning is gone. The Agents tab has a reader state, and the picker's name tip no longer opens over its own list. - The bell and the REST notification mirror name task statuses by the board's labels.
The task automation guide says what a run that fails for good shows on its task, who each kind of failure waits on, and the notice and email it sends; the tasks and project agents pages cover the assignee picker in a project without agents and the Agents tab as Members see it, in en, de and fr. Manual boxes TASK-F55 to F58, TASK-B35 and B36, TASK-A14, PROJ-F36, NOTIF-F20 and F21 follow, with the automation reference, and TASK-B5 no longer expects a spend-cap banner that no backend writes.
The retry job retired a failed run's retry when the project had been archived after the retry was queued, so a restored project never took it: archiving is someone's decision about all of the project's work, not this run's end. Only a starter who may no longer work the task ends the retry for good.
tale-code-bot
added a commit
that referenced
this pull request
Nov 2, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them, and its test pins them. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231
tale-review-bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 2, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 2, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 2, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 3, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 3, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 3, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 3, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 3, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 4, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 4, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 4, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 5, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 5, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 5, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
tale-code-bot
added a commit
that referenced
this pull request
Nov 6, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
yannickmonney
pushed a commit
that referenced
this pull request
Nov 15, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
yannickmonney
pushed a commit
that referenced
this pull request
Nov 23, 2026
usePrefetchTaskReads starts a task's own reads together with the task: its discussion, dependencies, reviewer and watch state. It now also starts its activity and agent runs, through the same adapter rows and so under the keys useTaskActivity and useTaskAgentRuns read. Both reads already start with the task: since a29ec1d (#4017) the dialog's body calls useLatestRunRefusal at its top, and that hook reads them. They keep that head start only while that read stays there. Moved into a section that mounts after the task, they would wait a round trip and a render behind it again (#3974's fourth cost), and no test would notice. The prefetch now names them and its test pins them; the manual layer's automation reference says so. No request is added: react-query joins the prefetch and the body's read into one request per key. The board does not warm its project's label catalog. The dialog draws the task's chips from the task itself. The catalog fills only the label picker, which opens on a click, well after the editor's own read has started. Closes #5231 Task: TALE-315
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A customer's Member asked chat for a small job (three files and a prompt). Chat pointed at "a task and an agent", and from there every step was a dead end. Reproduced live as a Member:
API Error: 502 …), no notification, the task still In progress, the Retry label cut off. Its activity rows stayed stale until a reload.This is PR A of three. B: a chat hand-over that finishes (header verb, project/agent preselect, "create and start", a live task row in the chat). C: an organization standard agent, so a project without agents still has one.
What changes
Failed runs are said and told
agent_run_failed. It goes to the run's starter and the task's unmuted watchers who can still open the project, under the existing Agent escalations preference. It's actionable, so it sends an email when a mailbox is connected. Starting a new run on the task marks it read.failureCodeandretryPending, and reads a failure as pending only while an armed retry is coming. That's a new column,auto_retry_armed_at_ms(migration 0142), stamped in the failing transaction. A failure code alone can't tell a sweep's fail (never armed) from the turn host's.Live run state
The picker and the Agents tab
useTriggerTooltipGuard, newly exported from@tale/ui, so it no longer opens over its own list or the dialog.Notification text
GET /api/v1/notifications/sync) name task statuses by the board's labels through one shared helper. It passes every other value through untouched: with i18next-icu, one missing value sends the whole message back to its raw template.Decisions (flagging for review)
TASK-B5expected a spend-cap banner no backend writes: a spend-cap refusal is a failed run. The box now describes the notice.Proof
lint:links,lint:manual,check-guide(tasks/projects/notifications), docs vitest. Full platform UI (558 files) and server (960 files) suites green.checkAgentRunFailureNoticepasses all 6 checks against a database migrated from the previous release: the migration shapes, recipients across org-wide and team projects (departed/muted/outside watchers excluded), withdraw on kick, arm → retry-job refusal → one announcement under double delivery, and the deadline sweep.Not in this PR