Skip to content

fix(agent-core-v2): stop warning on unhandled store.changed events - #3715

Merged
7Sageer merged 2 commits into
mainfrom
fix/store-changed-unhandled
Sep 10, 2026
Merged

fix(agent-core-v2): stop warning on unhandled store.changed events#3715
7Sageer merged 2 commits into
mainfrom
fix/store-changed-unhandled

Conversation

@7Sageer

@7Sageer 7Sageer commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

N/A — internal fix, no tracking issue. Problem explained below.

Problem

Every message sent in the CLI prints console noise like
[agent-core] unhandled event "store.changed" in actor "x:271".

The eventStore actor's publish fans each persisted event out two ways:
emit to external .on() subscribers (the real consumer path — works fine)
and a sendBack to the agent machine. The agent machine declares
store.changed in its event types but defines no transition for it, so the
xstate reportUnhandled hook warns on the resulting zero-transition
microstep. Pure noise, no functional impact.

What changed

  • Added a noop root-level 'store.changed': {} transition in the agent
    machine (packages/agent-core-v2/src/human/agent/machine.ts), mirroring
    the existing 'store.reset': {} noop in the session machine — the machine
    now explicitly acknowledges the event without reacting to it.
  • Added a regression test covering that persisting events no longer produces
    an unhandled-event warning.
  • Note: removing the sendBack from the storeActor was tried first and breaks
    xstate waitFor snapshot re-evaluation, so the noop-transition approach
    was chosen instead.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • 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 Sep 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b8e2de6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@7Hanrui

7Hanrui commented Sep 10, 2026

Copy link
Copy Markdown

@codex review

@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026

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

commit: d508d61

@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: 1783894747

ℹ️ 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".

"@moonshot-ai/kimi-code": patch
---

Stop printing a spurious "[agent-core] unhandled event" warning when sending messages.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove the internal component name from the changeset

When this changeset is rendered into the public CLI release notes, it exposes the internal agent-core component label. Rephrase this as a neutral user-facing description, such as stopping spurious unhandled-event warnings when messages are sent.

AGENTS.md reference: AGENTS.md:L82-L82

Useful? React with 👍 / 👎.

@7Sageer
7Sageer force-pushed the fix/store-changed-unhandled branch from 1783894 to d508d61 Compare September 10, 2026 14:01
@7Hanrui

7Hanrui commented Sep 10, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: d508d617cc

ℹ️ 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".

Signed-off-by: 7Sageer <sag77r@hotmail.com>
@7Sageer
7Sageer merged commit e348cf5 into main Sep 10, 2026
14 checks passed
@7Sageer
7Sageer deleted the fix/store-changed-unhandled branch September 10, 2026 14:05
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.

2 participants