Skip to content

fix: avoid runtime check rpc - #432

Merged
7Sageer merged 1 commit into
MoonshotAI:mainfrom
7Sageer:fix/remove-runtime-check-rpc
Jun 4, 2026
Merged

fix: avoid runtime check rpc#432
7Sageer merged 1 commit into
MoonshotAI:mainfrom
7Sageer:fix/remove-runtime-check-rpc

Conversation

@7Sageer

@7Sageer 7Sageer commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue; follow-up to #430.

Problem

The Windows Git Bash preflight merged in #430 added a dedicated checkRuntimeEnvironment method through CoreAPI, the SDK RPC client, and KimiHarness. That made the fix wider than necessary because the shell runtime is already a core session dependency.

What changed

Removed the dedicated runtime-check RPC and harness method, and stopped calling it from CLI startup. The Git Bash failure still surfaces from core when creating or resuming a session through the lazy Kaos initialization path. Added core regression coverage for create and resume failures, and adjusted CLI tests so they no longer mock the removed API.

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 Jun 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b7ffda0

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

@pkg-pr-new

pkg-pr-new Bot commented Jun 4, 2026

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

commit: b7ffda0

@7Sageer
7Sageer force-pushed the fix/remove-runtime-check-rpc branch from 03324ff to b7ffda0 Compare June 4, 2026 12:27

@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

const summary = await this.sessionStore.create({
id,
workDir,
});

P2 Badge Check runtime before persisting new sessions

When Git Bash is missing on Windows, the new startup path relies on createSession() to surface the Kaos failure, but this call has already created and indexed the session directory before getKaos() runs below. That leaves a failed, empty session in listSessions()/kimi -c results and can later be selected/resumed even though startup never succeeded; move the Kaos/runtime check before sessionStore.create() or roll the store entry back on this failure.


resumed: true,
restorePermission,

P2 Badge Surface missing Git Bash before model validation

For a fresh headless prompt on Windows with Git Bash missing and no configured model, startup now reaches requireConfiguredModel() before it ever calls into createSession(), so the user gets the “No model configured” error instead of the Git Bash preflight error and cannot follow the suggested kimi login flow until the shell runtime is fixed. If the runtime check is going to live on session creation, this path still needs to probe it before model validation or otherwise preserve the preflight behavior for first-run users.

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

@7Sageer
7Sageer merged commit 7856c03 into MoonshotAI:main Jun 4, 2026
8 checks passed
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