Skip to content

Follow-ups from the #4144 review: a run continues in a fresh empty workspace after a settled Destroy, and the destroy-pending marker's substring match #4159

Closed

Description

@yannickmonney

These are follow-ups from agent #2's independent review of #4144 (record 5971574076), which accepted the PR at 807a95888. It merged as b800f808a and closed #4122. Everything here comes from source, except where the record cites a run.

A run continues in a fresh, empty workspace after a Destroy that has already settled (INFO 1, older than #4144)

  • fix(platform): fail a step whose workspace is being destroyed #4144 fixed the pending Destroy. Once a Destroy has settled, the run still continues in a fresh, empty workspace:
    • the drive sees the session gone;
    • session_gone is re-kicked at once (stepper.ts:1281);
    • admission is open again.
  • sandboxes.md:68 describes that behaviour. So the later steps of an automation run silently lose the earlier steps' files.
  • Suggested fix: an incarnation check. When a run that already used its workspace is given a fresh one, fail the step with the Destroy reason, as the pending case now does.
  • Acceptance:
    • a real-Postgres lane: a step's workspace is destroyed and the Destroy settles before the next agent node starts. The next node fails with the Destroy reason and doesn't run in an empty workspace;
    • docs (EN/DE/FR sandboxes.md) and the register row updated.

LOW: the destroy-pending wrapped-message shape is a substring match

  • capacity_refusal.ts:102-105 classifies any message containing QUOTA_EXCEEDED and "reason":"destroy_pending" as a Destroy.
  • A staging error that names a user-uploaded file with such a name (agent_host.ts:1023,1031-1034) would get a misleading reason.
  • That shape may be dead in 0.5, because the ctx shim passes the AppError instance through.
  • Fix: parse the JSON and read code and reason from it, or remove the shape if it's dead, with a test either way.

INFO

  • The lane can't tell "never retried" from "three instant retries". All three would meet the pending Destroy. Asserting !detail.includes('attempts') in checkAutomationStepDestroyPending would pin it.
  • The step's failure text reads like a wait ("No new work starts in it until the deletion has finished"), with no hint to start the automation again. Like every run detail, it is English-only in DE/FR.

An independent review by a distinct agent.

Related: #4099, #4122, #4144, #4095.

Activity

  1. added
    agent-ready
    bug
    on Oct 29, 2026
  2. added a commit that references this issue on Nov 1, 2026
    df61c6e
  3. added 2 commits that reference this issue on Nov 1, 2026
    c5c8117
    7400e3c
  4. added a commit that references this issue on Nov 1, 2026
    dc4c6b2
  5. added 3 commits that reference this issue on Nov 1, 2026
    3b8db29
    71594b3
    25a4b01
  6. tale-code-bot commented on Nov 1, 2026

    @tale-code-bot
    Collaborator

    Landed on the feature line release/0.6 with feature train #5265, merged by rebase at 2026-11-01 17:57:59Z, as 25a4b01 fix(platform): fail a run whose sandbox workspace was deleted (task TALE-67). It ships with Tale 0.6.0.

    GitHub closes an issue from a Closes #4159 line only for a commit on the default branch main, so the feature-train role closes it here.

  7. 3 remaining items

  8. added 13 commits that reference this issue on Nov 2, 2026
    be5410b
    32ef95e
    3d1c29c
    708d19d
    500e446
    4060ad5
    90d7533
    965032c
    ac83d70
    cf2a01d
    b57980d
    251d631
    3e24764
  9. added a commit that references this issue on Nov 15, 2026
    04d4c8b
  10. added a commit that references this issue on Nov 23, 2026
    4ae4506
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions