Skip to content

fix(agent-core-v2): preserve goal completion summaries and error messages - #1678

Merged
chengluyu merged 3 commits into
MoonshotAI:mainfrom
chengluyu:fix/goal-resume-continuation-fixes
Jul 14, 2026
Merged

fix(agent-core-v2): preserve goal completion summaries and error messages#1678
chengluyu merged 3 commits into
MoonshotAI:mainfrom
chengluyu:fix/goal-resume-continuation-fixes

Conversation

@chengluyu

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue. This is a focused, reproduction-backed fix for two agent-core-v2 parity bugs.

Problem

Completing a goal during its resumed continuation could abort the live continuation before it emitted the assistant's completion summary. Separately, a generic LLM error was translated to internal and exposed in turn.step.interrupted as [internal] …, instead of the underlying error message.

What changed

  • Keep the live turn's pending continuation intact during goal cleanup, so it can finish and emit its final summary.
  • When publishing a step interruption for an internal wrapper with a cause, render the underlying error message; other coded errors keep their existing rendering.
  • Add regression tests for both paths and a CLI patch changeset.

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

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bdc61e7

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

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code 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

@chengluyu
chengluyu marked this pull request as ready for review July 14, 2026 06:39
@pkg-pr-new

pkg-pr-new Bot commented Jul 14, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@bdc61e7
npx https://pkg.pr.new/@moonshot-ai/kimi-code@bdc61e7

commit: bdc61e7

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

Copy link
Copy Markdown

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: 14be145425

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/agent-core-v2/src/agent/goal/goalService.ts Outdated
@chengluyu
chengluyu force-pushed the fix/goal-resume-continuation-fixes branch 2 times, most recently from b168534 to cb6dc99 Compare July 14, 2026 06:48
@chengluyu
chengluyu force-pushed the fix/goal-resume-continuation-fixes branch from cb6dc99 to bdc61e7 Compare July 14, 2026 07:10
@chengluyu
chengluyu merged commit ec1c974 into MoonshotAI:main Jul 14, 2026
14 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 14, 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