Skip to content

Kimi threads started from the planboard do not know the task #220

Closed

Description

@currentbits

Observed

When a thread is started from the planboard ("Start task" on an issue card) with the Kimi provider, the agent does not know what the task is. Claude and codex threads started the same way receive the issue context and start working; the kimi thread acts as if it got no task.

What the planboard path does

src/App.tsx:376 builds the first prompt as:

GitHub issue #<number>: <title>
<url>

<body>

and calls startRun, which in electron/runner.js:3601 wraps it with the handoff prefix, planboard note and self-id note, then dispatches to startKimiRun (runner.js:3630). providers.js:475 builds kimi argv as --output-format stream-json [-m model] [-c | -S id] -p <prompt>, so on paper the prompt reaches the CLI.

Candidate causes to investigate

  • Kimi one-shot -p turn combined with -c (per-cwd resume sentinel) or -S <session> may continue an old session and effectively ignore or bury the new prompt on a fresh thread.
  • Orchestrator threads (pendingFork, runner.js:3470) fork the first prompt to a worker; check the forked kimi worker actually receives the dispatchPrompt on its first turn.
  • Compare against issue Planboard live steps only work for claude; codex/opencode/kimi plans never appear #180 (planboard live steps only work for claude): may share a root cause in the kimi stream handling.

Expected

A kimi thread started from a planboard card receives the issue number, title, URL and body as its first turn, same as claude and codex threads.

Activity

  1. added
    bug
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Aug 17, 2026
  2. currentbits commented on Aug 17, 2026

    @currentbits
    OwnerAuthor

    Root cause was not the planboard prompt path — the prompt does reach the CLI. Verified live against kimi 0.36.0: a fresh -p with a multiline issue body is delivered.

    The real bug: -c is per-directory, and Solenta stamped sessionId: "cwd" after any hint-less kimi turn. Every no-worktree kimi thread in a project shares that directory, so thread A's second turn emitted -c and resumed whichever session last ran there — often thread B's. A's prompt then landed as a follow-up to someone else's conversation, which is what "acts as if it got no task" looks like. A first turn was never affected (a new thread has sessionId: null).

    Fix: drop the sentinel rather than guard it. kimi emits real resume hints and -S <id> works, so the per-cwd continue is dead legacy.

    • electron/runner.js — a hint-less turn stores null, never "cwd"; a prior real id is kept.
    • electron/providers.js — deleted the -c branch; a leftover "cwd" is treated as no session.
    • electron/store.js — load heals leftover "cwd" rows to null.

    Regression test: thread A's second turn does not -c into a session only thread B created. Verified both ways — 74 pass on the fix; reverting only the source files fails 11 tests.

    Known loss, accepted: a hint-less older kimi no longer continues across turns. Losing resume beats resuming a stranger's session.

  3. added
    plan:done
    and removed
    plan:doing
    on Aug 17, 2026
  4. added a commit that references this issue on Aug 17, 2026
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