Skip to content

OPE-142 Load composer agent picker from server catalog - #233

Merged
ivanfenenko merged 1 commit into
mainfrom
feature/ope-142-composer-agent-picker
Aug 22, 2026
Merged

ivanfenenko merged 1 commit into
mainfrom
feature/ope-142-composer-agent-picker

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Aug 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Session Chat agent chip lists non-hidden primary/all agents from GET /agent (v2: GET /api/agent), including custom agents like Review.
  • Prompt and slash-command send use the selected agent id instead of a Build/Plan map.
  • @ mentions stay the non-primary path.

Docs

  • docs/features/session-chat/plan.md

Checks

  • Android: AgentDomainAdapterTest, AgentProtocolRepositoryTest, and Session Chat send-mode tests passed.
  • iOS: matching adapter, protocol, and Session Chat send-mode tests passed.

Linear

  • OPE-142

Risks / Follow-ups

  • GET /agent is requested twice on Session Chat open (picker + @).
  • Pull-to-refresh does not reload the picker catalog.
  • Agent color and applying an agent's configured model/variant are deferred.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.


Note

Medium Risk
Changes how the turn-owning agent is chosen and sent on prompts/commands. Failures keep a local Build/Plan fallback, but a bad catalog or id mismatch could send the wrong agent.

Overview
Session Chat’s agent chip is no longer a hardcoded Build/Plan list. It now loads non-hidden primary/all agents from GET /agent (v2: GET /api/agent) on iOS and Android, so custom agents (e.g. Review) appear in the picker.

The selected agent id is sent on prompts and slash commands instead of mapping display labels to build/plan. @ mentions stay the non-primary path and do not change the turn-owning agent. If the catalog is empty or the current selection disappears, the client falls back to build or the first catalog entry.

Reviewed by Cursor Bugbot for commit 570a29d. Bugbot is set up for automated code reviews on this repo. Configure here.

@linear-code

linear-code Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
OPE-142 Composer agent picker from server catalog

Let Session Chat select any visible primary/all agent from the connected server — including user-defined agents — instead of hard-coding Build and Plan.

Desktop/TUI already cycles custom primary agents (Tab / switch_agent / /agents) from config (opencode.json agents/agent, or ~/.config/opencode/agents/ and .opencode/agents/*.md). Mobile now loads the same catalog into the composer mode picker.

Remaining:

  • ☐ Optionally apply a selected agent's configured model/variant
  • ☐ Optionally paint picker/chip with agent color

Done:

  • ☑ Picker shows non-hidden primary and all agents from GET /agent (v2: GET /api/agent)
  • ☑ Hidden system primaries (title, compaction, summary) stay out of the picker
  • ☑ Display names are title-cased ids (review → Review, code-reviewer → Code Reviewer)
  • ☑ Default is build when present; if the selected agent disappears, fall back to build or the first catalog entry
  • ☑ Prompt/command send uses the selected agent id
  • ☑ @ mentions stay the non-primary path

Docs: docs/features/session-chat/
Related: OPE-59, OPE-32

Review in Linear

@ivanfenenko

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 570a29d. Configure here.

@ivanfenenko
ivanfenenko merged commit 1059f36 into main Aug 22, 2026
4 checks passed
@ivanfenenko
ivanfenenko deleted the feature/ope-142-composer-agent-picker branch August 22, 2026 15:14
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.

1 participant