Skip to content

[Improve] Retry failed starts in a replacement task - #1747

Draft
roomote-roomote[bot] wants to merge 1 commit into
developfrom
feature/failed-start-recovery-1qkziphejreih
Draft

[Improve] Retry failed starts in a replacement task#1747
roomote-roomote[bot] wants to merge 1 commit into
developfrom
feature/failed-start-recovery-1qkziphejreih

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Replaced the failed-start launcher detour with one inline Retry action that creates a separate replacement task and navigates directly to it.
  • Preserved the original prompt, model, environment, compute provider, and canonical Fast-session ownership on the replacement.
  • Kept the original prompt visible and copyable on the failed task.
  • Made replacement creation retry-safe so concurrent or repeated submissions recover the same task instead of duplicating work or notifications.

Why this change was made

Failed Fast-delegated tasks need a fresh task identity without losing their parent session, chat thread, or lifecycle listeners. The replacement is derived entirely from persisted server state so browser input cannot spoof Fast linkage or reserved idempotency metadata.

Impact

Users can retry a failed environment start in one click and land directly on the replacement task. Fast receives the replacement's lifecycle events through the original canonical session, while canceled runs and snapshot-resume failures keep their existing behavior.

Screenshots

Failed task with copyable original prompt and one Retry action

@roomote-community

roomote-community Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

2 issues outstanding. See task

  • Only expose replacement Retry when canRetryFailedStart is true (apps/web/src/app/(sandbox)/task/[taskId]/startup/Startup.tsx:49).
  • Restore a recovery action for failed snapshot resumes (apps/web/src/app/(sandbox)/task/[taskId]/startup/StartupMessage.tsx:185).

Reviewed 78a0ebb

initialTaskRun={initialTaskRun}
newTaskHref={newTaskHref}
prompt={prompt}
onRetry={() => replaceFailedStart.mutate({ runId })}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onRetry is now provided for every failed boot, but the session query already exposes canRetryFailedStart because not every failed run is relaunchable. For a run with messages or a non-StandardTask payload, this renders Retry and then replaceFailedStart rejects it as not found. Pass the server-derived eligibility through and omit the action when it is false.

</Button>
</div>
)}
{isFailed ? (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also renders the snapshot-resume footer, but that caller supplies neither onRetry nor a replacement link. Since HistoricalContent gives an explicit footer precedence over its normal retry footer, failed snapshot resumes now have no recovery action at all. Preserve the prior fresh-task link or wire the existing resume retry action into this footer.

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