Skip to content

Conversation

@dante01yoon
Copy link

@dante01yoon dante01yoon commented Jan 12, 2026

changes

  • Introduced a new command 'subagents' to allow users to configure subagent-model assignments via an interactive TUI.
  • Updated schema to include 'subagents' in the list of builtin command names.
  • Added a new template for the 'subagents' command detailing the two-step TUI flow for user interaction.
  • Enhanced the command definitions to support the new functionality.

Summary

  • Add /subagents command for interactive TUI-based subagent-model configuration
  • Enable non-technical users to configure model assignments without editing JSON files manually
  • Implement two-step selection flow: list agents → select model → apply and confirm

Motivation

Previously, users had to manually edit oh-my-opencode.json to change subagent model assignments. This was:

  • Error-prone - JSON syntax errors, typos in model names
  • Non-intuitive - Users didn't know available options
  • Confusing for non-developers - Required understanding of config file structure

The /subagents command provides a user-friendly TUI that guides users through the configuration process.

Changes

File Change
src/features/builtin-commands/templates/subagents.ts New template with TUI flow instructions
src/features/builtin-commands/commands.ts Register subagents command
src/features/builtin-commands/types.ts Add "subagents" to BuiltinCommandName
src/config/schema.ts Add "subagents" to BuiltinCommandNameSchema

how it works

User types: /subagents

     │
     ▼
┌─────────────────────────────────────────┐
│ OpenCode detects /subagents command     │
│ Looks up in commands.ts registry        │
└─────────────────────────────────────────┘
     │
     ▼
┌─────────────────────────────────────────┐
│ Injects SUBAGENTS_TEMPLATE into prompt  │
│ AI now knows the TUI protocol           │
└─────────────────────────────────────────┘
     │
     ▼
┌─────────────────────────────────────────┐
│ AI displays Step 1 (numbered list)      │
│ WAITS for user input                    │
└─────────────────────────────────────────┘
     │
     User enters: 2
     │
     ▼
┌─────────────────────────────────────────┐
│ AI displays Step 2 (model selection)    │
│ WAITS for user input                    │
└─────────────────────────────────────────┘
     │
     User enters: 1
     │
     ▼
┌─────────────────────────────────────────┐
│ AI edits oh-my-opencode.json            │
│ Shows success toast                     │
│ Loops back to Step 1                    │
└─────────────────────────────────────────┘

Test plan

  • bun run typecheck - passes
  • bun run build - compiles successfully
  • Manual testing in OpenCode:
    • /subagents displays numbered list of all agents
    • Shows ✨ for custom/overridden models, 📌 for defaults
    • Number input navigates to model selection
    • Model selection updates config file
    • Success toast displays after save
    • Returns to agent list for additional changes
    • exit command exits the TUI

Screenshot

스크린샷 2026-01-12 오후 9 01 03 스크린샷 2026-01-12 오후 9 01 57 스크린샷 2026-01-12 오후 9 02 23 스크린샷 2026-01-12 오후 9 02 50 스크린샷 2026-01-12 오후 9 02 59

Testing

bun run typecheck
bun test

Related Issues

Address issue #678

- Introduced a new command 'subagents' to allow users to configure subagent-model assignments via an interactive TUI.
- Updated schema to include 'subagents' in the list of builtin command names.
- Added a new template for the 'subagents' command detailing the two-step TUI flow for user interaction.
- Enhanced the command definitions to support the new functionality.

This addition enhances the user experience by providing a structured way to manage subagent configurations.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

- Added a mandatory initial step to discover available models from OpenCode config files before displaying the UI.
- Updated model selection step to show only models discovered in the initial step, dynamically numbered and grouped by provider for better readability.
- Included handling for custom model input and improved messaging for cases with no configured providers.
- Expanded the common models reference section for clearer descriptions of available models.

These changes improve the user experience by ensuring that model selection is based on actual configurations, enhancing clarity and usability.
@dante01yoon
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 12, 2026
@yanksyoon
Copy link

Hi! This screenshot seems to show the text overflowing the text box. Could that be resolved in any way?

kdcokenny pushed a commit that referenced this pull request Jan 13, 2026
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.

2 participants