Skip to content

bug(platform): Project Agents turns a failed agent-list read into “Add an agent” #3882

Closed

Description

@yannickmonney

Bug: Project Agents turns a failed agent-list read into “Add an agent”

  • Classification: P2 confirmed product defect (Projects / Agents)
  • Source SHA: 9ea5972
  • Replay: /Users/yannick/.codex/notes/tale-1000-additional/project-agents-read-error-probe.log
  • Scope: isolated local jsdom/Vitest component probe; no production network or writes.

Reproduction

Render ProjectAgentsTab for a valid editable project while projects/queries:listProjectAgents settles with data: undefined, isLoading: false, and a 503 error. The actual tab renders the normal Add an agent to this project empty state and a working New agent action. It renders no error alert, failed-read copy, or Retry control. The probe passed one test against source SHA 9ea59724df24d62729a9360f3902d964dab39b3e.

Root cause and impact

useProjectAgents destructures only data and isLoading, returning agents: data ?? [] without the query error or retry callback. ProjectAgentsTab then branches on the empty array and presents a successful no-agents state. A transient list failure can lead an administrator to create a duplicate agent or believe the project has no configured workers; the existing roster/capability queries do not make the failed agent list visible.

Expected behavior is a list-read error state with Retry while retaining the project context and avoiding duplicate-create encouragement. This is separate from agent catalog invalidation and agent mutation failures because the failure occurs in the project agent directory query itself.

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