MoonshotAI / MoonshotAI/kimi-code

TaskList: support search/filter/sort for sessions with many background tasks

Open
#3,743 0 comments 0 reactions 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

问题描述

在长程会话里大量使用 run_in_background(后台命令 + 后台 subagent)之后,后台任务的查找体验会明显变差。主 agent 一个会话同时挂着 10-30 个后台任务(实验监控、日志 tail、多个子 agent)是常态,这时候:

  • TaskList 只有 limitactive_only 两个参数,想找一个任务只能把列表拉出来肉眼扫,description 又是 3-5 个词的短标签,任务一多就大量雷同,很难区分。
  • 结果里没有创建时间、完成时间字段,也没有排序参数,分不清哪条是最近的。
  • active_only 是二值过滤,想只看 failedtimed_out 的任务做不到。
  • 超过 limit 之后只能加大 limit 把整个列表重拉一遍,白白消耗 context。

主 agent 找到一个疑似 task_id 后还得逐个调 TaskOutput 确认,整个流程下来 context 消耗不小。

建议

以下任何一项都能显著改善:

  • TaskList 支持按描述关键字过滤(search 参数)
  • 支持 status 细分过滤,如 running / completed / failed / stopped
  • 结果附带 created_at 时间戳,并支持按时间排序
  • 或者提供一个 /tasks 交互命令,集中查看和跳转后台任务

希望官方考虑,感谢!

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 by inspecting the existing TaskList and TaskOutput interfaces and how background tasks are represented. The issue proposes several possible directions rather than one scoped change, so first establish which filtering, sorting, or interactive-command behavior is wanted; done should include an agreed API and tests covering the selected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.