MoonshotAI / MoonshotAI/kimi-code

feat(agent-core): stream live subagent events into background task output buffer

Open
#667 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

The /tasks view only shows a static output preview for background agents. While a subagent is running, the user cannot see what it is currently doing; the output only appears once the task completes or errors.

We fixed this in our fork by wiring the subagent's AgentEvent stream into the background task output buffer via formatAgentEvent(), so live turn starts, tool calls, results, and errors are appended as they happen.

Commit with the fix: https://github.com/thecannabisapp/kimi-code/commit/003420b9

If the maintainers want to merge this, the key change is in packages/agent-core/src/agent/background/agent-task.ts.

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

Start in packages/agent-core/src/agent/background/agent-task.ts and inspect how the background task output buffer is populated. Review formatAgentEvent() and the linked fork commit, then verify that the /tasks view receives live turn starts, tool calls, results, and errors while a subagent is running, not only after completion or failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.