opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Built-in agent overrides don't fully apply

Open felixnorden opened this issue 2 months ago • 2 comments

Description

When trying to override the default agents with custom configurations, not all configs and metadata are applied and propagated in the TUI.

Nothing is majorly blocking, but it seems like the preamble of the .md files aren't fully applied. The prompt itself is applied as expected and a workaround is to simply give another name to the file.

Workaround for now is to rename an agent file to not collide with the built-in.

OpenCode version

1.0.20

Steps to reproduce

  1. Create an agent with the same name as a built-in agent, e.g., plan.md
  2. Add in a preamble, such as the blow (not the mode: all and description:
<!-- agent/plan.md -->
---
description: Strategic analysis and development planning specialist. Provides comprehensive analysis and actionable implementation roadmaps without making code changes.
model: opencode/qwen3-coder
mode: all
tools:
  read: true
  grep: true
  glob: true
  list: true
  todoread: true
  webfetch: true
  context7: true
  write: false
  edit: false
  bash: false
  patch: false
  todowrite: false
---
<!-- Agent prompt -->
  1. Start up OpenCode in a new session
  2. Try to ping plan as a subagent
  • Notice that it won't show up
  1. Open up the agent picker and see that the description for the agent is still native

Screenshot and/or share link

plan.md file Image

Subagent ping for @plan Image

Agent picker showing "native" description Image

Operating System

macOS Sequoia 15.6.1

Terminal

Ghostty

felixnorden avatar Nov 04 '25 14:11 felixnorden

This issue might be a duplicate of existing issues. Please check:

  • #3575: Reports the exact same problem where overriding built-in agents applies custom prompts but ignores other configurations like permissions, metadata, and settings.

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Nov 04 '25 14:11 github-actions[bot]

Yeah there is prolly some logic in agent.ts or in the tui that is preventing it from showing up....

edit: seems to be in agent.ts

rekram1-node avatar Nov 04 '25 15:11 rekram1-node