Skip to content

feat(cli): list remote agents for the mobile app - #15159

Merged
iscekic merged 1 commit into
mainfrom
igor/remote-list-agents
Oct 16, 2026
Merged

iscekic merged 1 commit into
mainfrom
igor/remote-list-agents

Conversation

@iscekic

@iscekic iscekic commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #15133. The issue is fixed once this and the cloud PR ship.

What

Adds a list_agents remote-control command. It returns the agents a session can run as (not subagent-only, not hidden), resolved in a directory:

  • directory (relative, contained under the launch directory, resolved like create_session.directory) wins.
  • Otherwise a sessionId uses that session's directory.
  • Otherwise the launch directory.

The handler runs Agent.Service.list() inside that directory's instance, so project agents from .kilo/agents are included exactly as kilo agent list includes them.

Response: { protocolVersion: 1, agents: [{ name, displayName?, description? }] }, capped in count and string length.

Why

The mobile app's agent picker for a remote computer only knew the built-in modes and the cloud profile's agents. The remote protocol published models, slash commands and directories, but never agents, so project agents never reached the app.

Compatibility

Older CLIs answer unknown command: list_agents; the relay maps that to CLI_UPGRADE_REQUIRED and the app keeps its current list. The cloud side (relay allowlist, SDK helper, mobile picker) ships in a separate Kilo-Org/cloud PR.

@iscekic iscekic self-assigned this Oct 16, 2026
@github-actions github-actions Bot added the area:cli CLI, TUI and core engine label Oct 16, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The list_agents remote command is consistent with the existing list_models/create_session patterns: request validation rejects malformed versions and undecodable session IDs before dispatch, directory is resolved through the shared resolveUnderLaunch containment helper (rejecting escape/missing paths), and the async work runs inside the provided directory instance so project agents from .kilo/agents are resolved the same way kilo agent list resolves them. RemoteAgentCatalog.build filters subagent/hidden agents in line with the existing ACP/stream filtering conventions, truncates over-long descriptions, drops unfit names, and bounds the response count. No memory leaks, race conditions, or unhandled rejection paths introduced.

lgtm

Files Reviewed (4 files)
  • .changeset/remote-list-agents.md
  • packages/opencode/src/kilo-sessions/remote-agent-catalog.ts
  • packages/opencode/src/kilo-sessions/remote-sender.ts
  • packages/opencode/test/kilocode/sessions/remote-agent-catalog.test.ts

Reviewed by deepseek-v4.1-flash · Input: 75.4K · Output: 14.6K · Cached: 1.7M

Review guidance: REVIEW.md from base branch main

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

Labels

area:cli CLI, TUI and core engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants