Skip to content

fix(tui): restore agent name in task progress display#15946

Open
zerone0x wants to merge 1 commit intoanomalyco:devfrom
zerone0x:fix/task-display-agent-name
Open

fix(tui): restore agent name in task progress display#15946
zerone0x wants to merge 1 commit intoanomalyco:devfrom
zerone0x:fix/task-display-agent-name

Conversation

@zerone0x
Copy link
Contributor

@zerone0x zerone0x commented Mar 4, 2026

Issue for this PR

Closes #15915

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The v1.2.16 TUI refactor (PR #15607) replaced BlockTool with InlineTool for task rendering. The old BlockTool title was "# AgentName Task" — it showed the subagent_type (e.g. "Explore", "General"). The new inline renderer only builds Task ${description}, so the agent name is gone.

Fix: compute an agentPrefix from props.input.subagent_type (titlecased) and prepend it. The output becomes:

│ Explore: Task Verify Refit cancellation behavior
└ 22 toolcalls · 1m 1s

Falls back to plain Task description when subagent_type is absent. Locale.titlecase is already used on the same line for the tool name in the running-state line, so the pattern is identical to existing code.

How did you verify your code works?

Code diff reviewed against the old BlockTool title format and the new InlineTool content memo. The Locale.titlecase helper is already called in the same content memo (line 1982 for current().tool), so no new imports are needed.

Screenshots / recordings

UI change; no terminal recording attached but the format is text-only.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The v1.2.16 refactor (PR anomalyco#15607) replaced BlockTool with InlineTool for
task rendering. The old code showed the agent type (subagent_type) in
the BlockTool title as "# AgentName Task". The new inline format only
shows "Task description", dropping the agent name entirely.

Restore the agent name prefix so the output reads:
  │ Explore: Task Verify Refit cancellation behavior
  └ 22 toolcalls · 1m 1s

Falls back to plain "Task description" when subagent_type is not set.

Fixes anomalyco#15915

Co-Authored-By: Claude <noreply@anthropic.com>
@zerone0x
Copy link
Contributor Author

zerone0x commented Mar 4, 2026

The e2e failure is unrelated to this change. The failing test is:
[chromium] › e2e/projects/projects-switch.spec.ts:49 › switching back to a project opens the latest workspace session

It throws SQLiteError: FOREIGN KEY constraint failed in session/index.ts:691 — session database management, nothing to do with TUI task tool rendering. The same test suite passes on the concurrent PR #15948 and on fix/tui-thread-exit-cleanup, confirming this is a flaky test (or a regression introduced by the workspace rework in #15895 that merged right before this PR was submitted).

IgorTavcar added a commit to IgorTavcar/opencode that referenced this pull request Mar 4, 2026
Cherry-picked from upstream PR anomalyco#15946.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task/subagent progress display no longer shows agent name (e.g. Explore, General)

1 participant