Skip to content

bug(platform): a failed agent-list read makes a project's Default reviewer say its agent is unavailable #4644

Closed

Description

@yannickmonney

Summary

On a project's overview, the Default reviewer setting declares a saved reviewer agent unavailable whenever the project's agent list fails to load. The field shows:

The selected reviewer agent is unavailable. Choose another reviewer.

That text appears both as the select's value and as a caption under it. The agent exists and still reviews tasks; only the read failed. Following the instruction replaces a working reviewer.

This is the same class as #4605, where a failed project-list read marks Project budget rules "Deleted project" and says to remove them: a failed read is turned into a verdict plus a corrective instruction.

Source

In services/platform/app/features/projects/components/project-task-reviewer-section.tsx, rendered by project-overview.tsx:333:

  • Line 40: const { agents, isLoading: agentsLoading } = useProjectAgents(projectId);. useProjectAgents (hooks/queries.ts:63) also returns hasAnswer, error and retry; the project's Agents tab uses them, but this section doesn't. A failed read leaves agents: [] with isLoading false.
  • Lines 84–85: const unavailable = reviewer.kind === 'agent' && !agentsLoading && !selectedAgent;.
  • Line 153: the select shows selectedAgent?.name ?? t('taskReview.unavailable').
  • Lines 200–201: the caption taskReview.unavailable.
  • Not tested: project-task-reviewer-section.test.tsx mocks useProjectAgents with a loaded list only.

The same text ships in German ("Der gewählte Reviewer-Agent ist nicht verfügbar. Wähle einen anderen Reviewer.") and French ("L’agent relecteur sélectionné est indisponible. Choisis un autre relecteur.").

Dedupe: I scanned 252 open items (85 PRs); none covers this.

Reproduction (expected from the code; not run live)

  1. In a project, set Default reviewer to an agent that has task_review.
  2. Reload the project's overview while projects/queries:listProjectAgents fails (offline, or a server error).
  3. The field reads "The selected reviewer agent is unavailable. Choose another reviewer."

Expected

Only a successful read that lacks the agent may say it is unavailable. On a failed read:

  • keep the saved choice;
  • say the agent list couldn't load;
  • offer Try again (retry, which the hook already returns).

Regression expectation

A section test with useProjectAgents returning a failed read (hasAnswer: false, error set, no agents) and a saved agent reviewer:

  • no taskReview.unavailable text;
  • a load-failure message with Try again;
  • the existing "agent removed" case keeps its message.

Triage

Activity

  1. yannickmonney commented on Oct 12, 2026

    @yannickmonney
    ContributorAuthor

    Addendum at main aec031867 (Review A, TALE-358, 2026-10-12 04:15 Zurich occurrence; static reading).

    The same pattern is on the task page's reviewer field, and #4681 (0cae27f45) didn't change it. In services/platform/app/features/tasks/components/task-reviewer-field.tsx:

    • :58-60 keeps only { agents, isLoading } from useProjectAgents(…).
    • :74 computes unavailable = agentId !== undefined && !agentsLoading && !agent.
    • :154-156 then shows reviewer.agentUnavailable, "This reviewer agent is unavailable. Choose another reviewer."

    So a failed agent-list read tells someone on a task that the task's configured or inherited reviewer agent is gone and should be replaced. The project-level section this issue names (project-task-reviewer-section.tsx:84-85, :153, :200-201) is unchanged too. #4681 only made the task field show the selected or inherited reviewer.

    Expected: extend this issue's fix to the task field. On a failed agents read, say the reviewer list couldn't be loaded and offer Try again; give no verdict about the reviewer.

  2. added
    agent-ready
    on Oct 29, 2026
  3. added a commit that references this issue on Oct 30, 2026
    0a2c0b2
  4. added a commit that references this issue on Oct 30, 2026
    e939882
  5. added a commit that references this issue on Oct 30, 2026
    757b2da
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