Skip to content

feat: append TODO list as markdown to compaction summary#319

Merged
kermanx merged 1 commit into
mainfrom
feat/append-todo-to-compaction-summary
Jun 2, 2026
Merged

feat: append TODO list as markdown to compaction summary#319
kermanx merged 1 commit into
mainfrom
feat/append-todo-to-compaction-summary

Conversation

@kermanx
Copy link
Copy Markdown
Collaborator

@kermanx kermanx commented Jun 2, 2026

Related Issue

N/A — this is a standalone feature request.

Problem

Compaction replaces the conversation prefix with a summary, but the TODO list (maintained via the TodoList tool) is stored separately in the tool store. After compaction, the LLM no longer sees outstanding TODOs in context, which can cause tasks to be forgotten during long sessions.

What changed

  • Added a post-process step in FullCompaction.compactionWorker that appends the current TODO list to the generated summary before it is written to history.
  • Reused the existing renderTodoList helper from todo-list.ts, adding an optional title parameter so the output can start with a ## TODO List heading for compaction while keeping the original Current todo list: heading for the tool response.
  • If the TODO list is empty, nothing is appended.
  • Added a test case in full.test.ts verifying the appended format.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 2, 2026

🦋 Changeset detected

Latest commit: 2ea9582

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@moonshot-ai/agent-core Minor
@moonshot-ai/kimi-code Minor
@moonshot-ai/migration-legacy Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 2, 2026

pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@2ea9582
npx https://pkg.pr.new/@moonshot-ai/kimi-code@2ea9582

commit: 2ea9582

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2ea95822c5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/agent-core/src/agent/compaction/full.ts
@kermanx kermanx merged commit fe7db4a into main Jun 2, 2026
9 checks passed
@kermanx kermanx deleted the feat/append-todo-to-compaction-summary branch June 2, 2026 08:20
@github-actions github-actions Bot mentioned this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant