Skip to content

[FEATURE]: Support explicit "name" field in agent definition files and config #29613

@JavertArdo

Description

@JavertArdo

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Summary

Add support for a name field inside agent definition files and config so the displayed agent name does not depend on the markdown filename.

Currently, according to the docs:

"The markdown file name becomes the agent name. For example, review.md creates a review agent."

This creates unnecessary coupling between filesystem naming and runtime/UI naming.

Problem

Right now the filename fully determines the agent name. This causes several issues:

  • Renaming files unintentionally renames agents.
  • It is difficult to maintain consistent naming across environments.
  • Repository organization and agent naming cannot be managed independently.

Additionally, OpenCode automatically uppercases the first letter of the derived name, which breaks certain naming conventions.

Example:

  • filename: opencode_auditor.md
  • resulting agent name: Opencode_auditor instead of opencode_auditor

Proposed Solution

Support a dedicated name field in the agent file frontmatter the same way as description is present.

Example:

---
name: opencode_auditor
description: "..."
---

# Agent instructions...

Similar field should also be present in opencode.json config file under agent section.

Expected Behavior

  • If name is present, use it exactly as provided.
  • Do not automatically transform capitalization.
  • If name is absent, preserve the current filename-based fallback behavior for backward compatibility.

Benefits

  • Decouples filesystem naming from displayed agent naming.
  • Enables consistent naming conventions.
  • Prevents unwanted automatic capitalization.
  • Maintains backward compatibility.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions