Skip to content

[BUG] Agent label renders incorrectly with OMO: 'Deep agent' becomes 'Deep ent' #22131

Closed as not planned

Description

@liupengTk421

Description

When OMO / oh-my-openagent is installed, the agent badge text in the OpenCode TUI can render incorrectly.

A concrete example on my machine:

  • Expected: Deep agent
  • Actual: Deep ent

This is not just normal truncation of a long label. The text appears visually corrupted, as if width calculation / clipping is being applied to a polluted display string.

What I verified

I checked the local configuration and ruled out a user config typo.

  • My source config is clean
  • The original oh-my-openagent.json contains a normal display name such as Hephaestus - Deep Agent
  • But the resolved runtime config contains zero-width-space-prefixed names

Example from resolved config:

"name": "\u200b\u200bHephaestus - Deep Agent"

I also verified that the source config itself does not contain those zero-width characters.

Why this seems to be an OpenCode-side bug trigger

There are already two nearby classes of issues:

The current bug seems to happen when those two conditions meet:

  1. agent names reaching OpenCode are polluted with U+200B prefixes
  2. TUI width/truncation logic then mismeasures or clips the rendered label
  3. the badge renders as broken text such as Deep ent

Expected behavior

Agent labels should render cleanly and predictably in the TUI, even if upstream plugin ecosystems accidentally include zero-width characters.

At minimum, OpenCode should sanitize invisible formatting characters before width measurement / truncation / badge rendering.

Actual behavior

The badge text becomes visually incorrect instead of simply clipping cleanly.

Environment

  • OpenCode version: 1.4.3
  • macOS Apple Silicon
  • OMO / oh-my-openagent installed

Screenshot

I can provide the screenshot I captured locally if helpful; the rendered badge shows Deep ent where Deep agent is expected.

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Apr 12, 2026
  2. github-actions commented on Apr 12, 2026

    @github-actions
    Contributor

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

  3. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  4. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions