Skip to content

VSCode Agents view hides task builders whose id contains - or _ #1992

Done

Description

@waleedkadous

VSCode Agents view hides task builders whose id contains - or _

Version: @cluesmith/codev 3.3.4 (CLI and cluesmith.codev-vscode 3.3.4), Linux, Node 22.19.0

What happens

A builder spawned with afx spawn --task "..." whose random id contains - or _ (for example task-S0-L,
task-_-LM) never appears in the VSCode Agents view, even after Developer: Reload Window. afx status lists it,
and its terminal is live.

Cause

dist/agent-farm/servers/overview.js, worktreeNameToRoleId():

const taskMatch = lower.match(/^task-([a-z0-9]+)/);
if (taskMatch)
    return `builder-task-${taskMatch[1]}`;

For the worktree task-S0-L this returns builder-task-s0, while the live terminal is registered as
builder-task-s0-l. getOverview() then filters the builder out:

builders = builders.filter(b => b.roleId !== null && activeBuilderRoleIds.has(b.roleId));

So /workspace/<ws>/api/overview returns builders: [], while /workspace/<ws>/api/state correctly lists
builder-task-s0-l.

Steps to reproduce

  1. Spawn task builders until one gets an id containing - or _ (the ids look base64url-like).
  2. afx status shows the builder. GET /workspace/<ws>/api/state lists it under builders.
  3. GET /workspace/<ws>/api/overview omits it, and the VSCode Agents view does not show it.

Expected

Every live builder appears in the Agents view, whatever characters its id contains.

Suggested fix

Take the whole suffix for task (and probably worktree- and the generic protocol) names, for example
/^task-([a-z0-9_-]+)$/. Or better, derive the role id from the same function that registers the terminal, so the
two cannot drift. A unit test with ids task-S0-L and task-_-LM would cover it.

Activity

  1. added 14 commits that reference this issue on Nov 26, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions