Skip to content

[Bug] 2.5.2: completed subagent cards have no transcript after resuming a pre-2.5 session #4740

Open

Description

@mayii2001

Environment

  • Kimi Code CLI 2.5.2, upgraded from 2.4.1
  • Session created under 2.4.1, resumed with kimi --session <id>
  • Reproduced on a copy of the session, both binaries run side by side

What happens

Completed subagent cards render with no body and no tool calls. Same session, same subagent, same card:

2.4.1:

✗ agent stopped (<model> · high · <task description>)

2.5.2:

✗ SubAgent Failed (<task description>) · 0 tools
  · 0 tools
  │ Background agent killed

Subagents that are still running do render content. Historical ones are always empty. Ctrl-O does not expand them either: computeHiddenContent() returns false early for isSingleSubagentView().

Same on the web/desktop client: the subagent panel opens empty. The frontend already has openAgentPanel, agentPanelTurnsOf, agentPanelHasMore, loadOlderAgentMessages (paginated history), but there is nothing to page through.

Data is still there

The session has 9 subagent directories. The main wire holds 220 subagent.spawned links, and every agents/<id>/wire.jsonl still contains the full conversation. Reading those files by hand is currently the only way to see the history.

Steps to reproduce

  1. On 2.4.1, run a session that spawns a subagent and let it finish.
  2. Upgrade to 2.5.2.
  3. kimi --session <id>, or open the session in web/desktop.
  4. The subagent card shows · 0 tools and no body.

Likely cause

The TUI resume path calls:

harness.resumeSession({ id, replayTurnLimit: 11 })

with no includeSubagents. The session layer only materializes subagent replay behind:

if (replay?.includeSubagents === true) { /* walk agents/*, create + resumedAgentState */ }

so historical subagent state is never loaded. 2.4.1 makes the same call, but its card did not display detail. 2.5.0 switched to the SubAgent card (changelog: "优化长时间运行的 subagent 卡片,输出持续增长时保持响应"), which surfaces the gap.

Suggestion

Load subagent detail on demand instead of eagerly:

  • keep resume as it is — summary line only, no eager folding;
  • when an agent is opened, fold that agent's agents/<id>/wire.jsonl and page it by turns (e.g. 10 turns per page), reusing agentPanelHasMore / loadOlderAgentMessages, shared by TUI and web.

Default rendering cost stays the same; only the opened agent pays the fold, so old sessions with hundreds of subagents are not slowed down. A one-line stopgap is to pass includeSubagents: true on resume, but folding every subagent of an old session gets slow, so it only works short-term.

Expected

Resuming a pre-2.5 session and opening any completed subagent shows its tool calls and messages, with older turns loadable, without slowing the default view.

Activity

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

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