Skip to content

fix(coding-agent): list client-owned workers - #1323

Open
veerareddyvishal144 wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
veerareddyvishal144:fix/list-owned-workers
Open

fix(coding-agent): list client-owned workers#1323
veerareddyvishal144 wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
veerareddyvishal144:fix/list-owned-workers

Conversation

@veerareddyvishal144

@veerareddyvishal144 veerareddyvishal144 commented Aug 13, 2026

Copy link
Copy Markdown

Summary

Fix prime-agent list under-reporting live workers that are owned by another CLI client.

The supervisor previously filtered the list response through isVisibleWorker(), which intentionally excludes client-owned workers for attach/selection semantics. Because prime-agent list uses a fresh daemon connection, it could not see those workers and incorrectly printed No active agents. even while they were running.

This change keeps isVisibleWorker() unchanged and fixes only the list path:

  • include every resident worker in the daemon list response, regardless of ownership
  • expose worker ownership on the public session summary
  • add an owner column to the CLI table (attached for client-owned workers)
  • add coverage for owned and unowned list rows

Validation

  • npx vitest run packages/coding-agent/test/daemon-list-format.test.ts
  • npx tsgo --noEmit
  • npx biome check --write --error-on-warnings .
  • repository pre-commit checks passed
  • git diff --check

Fixes #1215

Note

Fix daemon list command to include client-owned worker sessions

  • DaemonSupervisor.handleList now returns all workers regardless of ownership, removing the previous filter that excluded client-owned sessions from other clients.
  • publicSummary is extended to include ownerClientId on each session summary when set on the worker descriptor.
  • The session list table gains an owner column that displays attached for client-owned sessions and is empty for resident sessions.
  • Risk: clients that previously relied on the list being scoped to visible/accessible workers will now see all sessions.

Macroscope summarized f97d00a.

Signed-off-by: vishal veerareddy <vishalveera.reddy@servicenow.com>

@jonaowen jonaowen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list-path direction is right, but this needs two changes before merge.

  1. Do not add raw ownerClientId to the public SessionSummary returned to every daemon client. The UI only needs an ownership classification (attached/resident), not the internal client capability/identity. Expose a boolean or narrow enum computed by the supervisor. This is also a daemon response-shape change: update the protocol/schema compatibility contract and old/new peer tests per repository doctrine, or place it behind an existing negotiated shape that is demonstrably compatible.
  2. The added test constructs summaries and exercises only table formatting. It does not prove handleList includes a worker owned by a different client while attach/selection remains filtered, nor that busyClientOwnedSessionCount and stop safety remain accurate. Add a supervisor/daemon behavioral regression with owned and unowned workers and two client identities.

Please also remove or redefine the now-dead includeClientOwned request semantics rather than silently accepting and ignoring it; retaining a flag with behavior different from its negotiated contract is misleading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

list reports "No active agents" while agents are running: isVisibleWorker hides any worker with an ownerClientId

2 participants