Skip to content

fix: honor KIMI_CODE_HOME for global agent resources - #544

Merged
liruifengv merged 2 commits into
mainfrom
fix-skills-root
Jun 8, 2026
Merged

fix: honor KIMI_CODE_HOME for global agent resources#544
liruifengv merged 2 commits into
mainfrom
fix-skills-root

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue.

Problem

When KIMI_CODE_HOME was set, the main config and data files moved to the configured directory, but Kimi-specific global agent resources still came from the real OS home under ~/.kimi-code. This made isolated homes unexpectedly share global Skills and AGENTS.md instructions.

What changed

Kimi-specific user Skills now load from $KIMI_CODE_HOME/skills, and global Kimi-specific agent instructions now load from $KIMI_CODE_HOME/AGENTS.md. Generic cross-tool .agents resources remain under the real OS home. Tests and bilingual documentation were updated to cover and explain the new behavior.

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.

Validation:

  • pnpm vitest run packages/agent-core/test/profile/context.test.ts packages/agent-core/test/skill/scanner.test.ts packages/agent-core/test/harness/skill-session.test.ts packages/node-sdk/test/session-skills.test.ts packages/agent-core/test/session/subagent-host.test.ts
  • pnpm -C docs run build
  • pnpm --filter @moonshot-ai/agent-core run typecheck
  • pnpm --filter @moonshot-ai/kimi-code-sdk run typecheck
  • git diff --check

@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d1dbdf1

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

This PR includes changesets to release 2 packages
Name Type
@moonshot-ai/agent-core Patch
@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

@pkg-pr-new

pkg-pr-new Bot commented Jun 8, 2026

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

commit: d1dbdf1

@liruifengv
liruifengv merged commit 5cff6d6 into main Jun 8, 2026
8 checks passed
@liruifengv
liruifengv deleted the fix-skills-root branch June 8, 2026 09:42
@github-actions github-actions Bot mentioned this pull request Jun 8, 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