anomalyco / anomalyco/opencode

TUI: generic plugin tools don't show their live title while running

Open
#49,752 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Problem

A plugin tool can report progress with ctx.metadata({ title }) while it runs. The TUI only renders that state.title for task sub-tools. For any other tool coming from a plugin, GenericTool (packages/tui/src/routes/session/index.tsx) always shows the tool name plus its input, so the row stays frozen on something like ⚙ my_tool [arg=…] for the whole run even though the plugin keeps updating the title.

Expected

While a generic tool is running and has a state.title, show that title (as Task already does); fall back to the input when there is none. Completed tools are unaffected.

Repro
  1. Write a plugin tool that calls ctx.metadata({ title: "step 1/3" }), then later ctx.metadata({ title: "step 2/3" }), during a multi-second execute.
  2. Run it from the TUI.
  3. The row never changes until the tool completes.
Notes

Six-line change in GenericTool; I have it ready and will open a PR referencing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read GenericTool in packages/tui/src/routes/session/index.tsx and compare its running-state display with the Task sub-tool. Ensure a running generic tool shows state.title when available and otherwise retains its input display; completed tools should remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.