Skip to content

Kimi reasoning effort races concurrent kimi turns (global config.toml flip window) #181

Closed

Description

@currentbits

Problem

Kimi has no per-invocation effort flag, so flipKimiEffort (electron/kimi.js:50-93) rewrites the user-global ~/.kimi-code/config.toml around every spawn. Documented ceiling (docs/ISSUES.md:116): concurrent kimi turns race the flip window, so two simultaneous kimi turns can run at the wrong effort. The ponytail at electron/kimi.js:44-45 says "serialize flips or use a per-invocation flag when kimi ships one."

Impact

Multi-thread fan-out is the product's core use case; a wrong-effort run silently costs more or thinks less.

Fix direction

Serialize flips with a mutex around the whole spawn (doable today), and revisit a per-invocation flag when kimi ships one.

Activity

  1. added
    bug
    plan:todo
    on Aug 16, 2026
  2. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    From the kimi-code doc-mine: the race fix landed upstream. KIMI_MODEL_THINKING_EFFORT env var forces effort on the wire (docs: bypasses the model's declared support_efforts), and KIMI_MODEL_NAME + KIMI_MODEL_API_KEY carry a full per-spawn model without touching config.toml. The flip-write hack in electron/kimi.js is obsolete — delete it.

  3. added
    plan:doing
    plan:done
    and removed
    plan:todo
    plan:doing
    on Oct 9, 2026
  4. currentbits commented on Oct 9, 2026

    @currentbits
    OwnerAuthor

    Fixed (#671): each Kimi thread gets its own KIMI_CODE_HOME with a copied config.toml (runner-provider-kimi.js:328), so effort flips no longer race. Only the ssh/WSL path still shares the file. Closing in the 2026-10-09 board cleanup (#1532).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions