Skip to content

[TUI] Subagent panel keeps completed foreground subagents listed as running indefinitely (elapsed timer never stops; negative-time glitch on completed entries) #2154

Description

@seasonmsg

Summary

In the TUI side panel ("子 Agent · N 运行中"), subagents that ran in the foreground (parallel Agent tool calls whose results have already been returned to and consumed by the parent) remain listed as 运行中 (running) with an ever-increasing elapsed timer, hours after completion. The task system reports zero active background tasks, and no child processes remain.

Environment

  • kimi-code 0.29.0
  • Windows 11, Git Bash

Observed behavior

  1. Launch ≥2 foreground parallel subagents (e.g. read-only explore agents).
  2. All of them complete; the parent receives and uses their reports (files written from their output, work continues for hours).
  3. The panel still shows them as 运行中 with the timer counting up from launch time (e.g. 运行中 · 351:31 — 5.8 hours after completion).
  4. Entries accumulate: resuming a foreground subagent adds another permanently-stuck entry (in one session the stuck count grew from 3 to 4).
  5. A background subagent (run_in_background=true) in the same session did flip to 完成 — but its elapsed field first rendered a negative value (完成 · -1993s) and later showed a positive one (完成 · 1070s), i.e. the sign/format of the "time since completion" field is also unstable.

Expected

  • Panel entries transition to a completed state when the subagent finishes (regardless of foreground/background), and the timer stops.
  • Elapsed-since-completion never renders negative.

Evidence

  • TaskList (active_only=false) at the same moment: active_background_tasks: 0.
  • The "running" agents' deliverables were produced hours earlier and subsequent task stages have long finished (screenshots available on request).

Impact

Cosmetic/state-tracking only — no functional damage — but genuinely misleading: users cannot distinguish live work from stale entries, and the counter grows without bound.

Metadata

Metadata

Assignees

No one assigned

    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