New tui does not let running agents using @agent_name. #2537

Closed
opened 2026-02-16 17:36:08 -05:00 by yindo · 8 comments
Owner

Originally created by @SKozar on GitHub (Nov 3, 2025).

Originally assigned to: @thdxr on GitHub.

Description

New TUI in versions 1.0.x doesn’t allow running agents using @agent_name. In older versions (0.15.x), it works correctly.

In versions 1.0.x, writing @ provides autocompletion to select files but doesn’t show agents. If you ignore autocompletion and type the agent name directly, it doesn’t recognize the name in the prompt and treats it as part of the input.

This is an issue when creating custom agents meant to function as subtasks.

According to the (documentation)[https://opencode.ai/docs/agents/], it should still work?

OpenCode version

1.0.x

Steps to reproduce

  1. run opencode
  2. switch to build mode
  3. write prompt @plan create plan to implement hello world application in python
  4. TUI will accept it as just regular prompt in build mode and would not invoke @plan agent.

Screenshot and/or share link

Image

Operating System

macOS 17.7

Terminal

iTerm2. Problem is the same with regular Terminal.

Originally created by @SKozar on GitHub (Nov 3, 2025). Originally assigned to: @thdxr on GitHub. ### Description New TUI in versions 1.0.x doesn’t allow running agents using @agent_name. In older versions (0.15.x), it works correctly. In versions 1.0.x, writing @ provides autocompletion to select files but doesn’t show agents. If you ignore autocompletion and type the agent name directly, it doesn’t recognize the name in the prompt and treats it as part of the input. This is an issue when creating custom agents meant to function as subtasks. According to the (documentation)[https://opencode.ai/docs/agents/], it should still work? ### OpenCode version 1.0.x ### Steps to reproduce 1. run `opencode` 2. switch to build mode 3. write prompt `@plan create plan to implement hello world application in python` 4. TUI will accept it as just regular prompt in build mode and would not invoke @plan agent. ### Screenshot and/or share link <img width="1728" height="1022" alt="Image" src="https://github.com/user-attachments/assets/b584e24d-0c29-4d13-8027-b58530bcb0ca" /> ### Operating System macOS 17.7 ### Terminal iTerm2. Problem is the same with regular Terminal.
yindo added the opentuibug labels 2026-02-16 17:36:08 -05:00
yindo closed this issue 2026-02-16 17:36:08 -05:00
Author
Owner

@thdxr commented on GitHub (Nov 3, 2025):

is this the built in plan mode? you don't have anything configured?

@thdxr commented on GitHub (Nov 3, 2025): is this the built in plan mode? you don't have anything configured?
Author
Owner

@AbbasSrour commented on GitHub (Nov 3, 2025):

I can confirm as well, the @ is not showing subagents for me also.

@AbbasSrour commented on GitHub (Nov 3, 2025): I can confirm as well, the @ is not showing subagents for me also.
Author
Owner

@SKozar commented on GitHub (Nov 3, 2025):

is this the built in plan mode? you don't have anything configured?

i have configured agent named @refactor. It does work too.

@SKozar commented on GitHub (Nov 3, 2025): > is this the built in plan mode? you don't have anything configured? i have configured agent named @refactor. It does work too.
Author
Owner

@SKozar commented on GitHub (Nov 3, 2025):

is this the built in plan mode? you don't have anything configured?

yes, it's default plan mode in example

@SKozar commented on GitHub (Nov 3, 2025): > is this the built in plan mode? you don't have anything configured? yes, it's default plan mode in example
Author
Owner

@thdxr commented on GitHub (Nov 3, 2025):

can i see your config?

@thdxr commented on GitHub (Nov 3, 2025): can i see your config?
Author
Owner

@thdxr commented on GitHub (Nov 3, 2025):

    return agents
      .filter((agent) => !agent.builtIn && agent.mode !== "primary")
@thdxr commented on GitHub (Nov 3, 2025): ``` return agents .filter((agent) => !agent.builtIn && agent.mode !== "primary") ```
Author
Owner

@thdxr commented on GitHub (Nov 3, 2025):

this is how we check

@thdxr commented on GitHub (Nov 3, 2025): this is how we check
Author
Owner

@SKozar commented on GitHub (Nov 4, 2025):

this is how we check

In my use case, I've redefined the default @build agent to be a subagent. I did this to prevent unintentional switches to build mode without compromising the planning process.

But I'd still like to have the option to run simple tasks that don’t require planning by using @build do some task.

Is it possible to modify the check and remove the restriction on using built-in agents as subagents? Is there any reason for this limitation that I’m not understanding?

Thank you.

@SKozar commented on GitHub (Nov 4, 2025): > this is how we check In my use case, I've redefined the default @build agent to be a subagent. I did this to prevent unintentional switches to build mode without compromising the planning process. But I'd still like to have the option to run simple tasks that don’t require planning by using `@build do some task`. Is it possible to modify the check and remove the restriction on using built-in agents as subagents? Is there any reason for this limitation that I’m not understanding? Thank you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2537