Skip to content

Bug: task agent Details spins forever after a failed sandbox-op read #3830

Closed

Description

@yannickmonney

Bug: task agent Details spins forever after a failed sandbox-op read

  • Classification: confirmed candidate defect, P2 (run inspection has no settled state or recovery).
  • Source SHA: 9ea59724df24d62729a9360f3902d964dab39b3e.
  • Evidence: /Users/yannick/.codex/notes/tale-1000-additional/agent-read-probe.log; the isolated current-component Vitest probe passed the Details-dialog assertion.

Reproduction

  1. Open a task with a settled agent run and click Details.
  2. Let tasks/queries:getTaskAgentRunSandboxOp settle with a generic 503 (data: undefined, isError: true).
  3. Observe the dialog body.

The dialog computes const op = opQuery.data ?? null. It then checks op !== null, else opQuery.data === null, else renders a bare Loader2. With undefined data from a failed query, the second check is false, so the dialog shows an unlabeled spinner indefinitely. The probe opened the actual Details dialog with the settled error shape and observed no alert, no retry/reload button, and no normal “no log” message.

Root cause

services/platform/app/features/tasks/components/task-agent-run-entry.tsx:92-126 does not consume opQuery.isError, error, or refetch; it uses undefined both for loading and for failed reads, while its null-data empty state is reserved for successful no-op responses. This is distinct from the task lane defect because the lane is present and the failure occurs only after opening Details.

Expected / actual

Expected: distinguish loading, successful no-log, and failed read; show a localized error and retry action. Actual: the operator sees a spinner with no accessible status and no way to recover inside the dialog.

Probe

The local probe rendered the actual TaskAgentRunEntry, opened Details, and controlled the sandbox-op query to {data: undefined, isError: true, error: new Error('503')}. All three assertions passed in agent-read-probe.log; no production system or source was changed.

Suggested repair

Handle opQuery.isError before the data === null branch, render an alert with refetch, and add a regression covering a settled op-read failure after the dialog opens.

Activity

  1. yannickmonney commented on Oct 4, 2026

    @yannickmonney
    ContributorAuthor

    TALE-262 implementation checkpoint: #3830 and #3831 have identical reproduction and root cause in TaskAgentRunEntry. I am fixing this once on fix/task-agent-details-read-recovery from current origin/main, with Closes for both issues. Please avoid a duplicate implementation. TALE-260 (#3828) uses a different automation transcript surface and remains out of scope.

  2. yannickmonney commented on Oct 4, 2026

    @yannickmonney
    ContributorAuthor

    Single implementation for duplicate #3830 / #3831: #4294 at d84327b. EN/DE/FR failed-read alert and read-only Try again replace the endless spinner, with shared retry-focus recovery and an accessible pending state. Six focused suites / 100 tests pass; the three locale regressions fail against main. Scoped type/lint/format/manual checks pass. CI is being watched without reruns or cancellations. Browser focus/layout acceptance remains for independent review under the light/jsdom-only dispatch limits.

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

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions