You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kimi threads started from the planboard do not know the task #220
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.
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.
Activity
currentbits commentedon Aug 17, 2026
Root cause was not the planboard prompt path — the prompt does reach the CLI. Verified live against kimi 0.36.0: a fresh
-pwith a multiline issue body is delivered.The real bug:
-cis per-directory, and Solenta stampedsessionId: "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-cand 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 hassessionId: 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 storesnull, never"cwd"; a prior real id is kept.electron/providers.js— deleted the-cbranch; a leftover"cwd"is treated as no session.electron/store.js— load heals leftover"cwd"rows tonull.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.
Merge pull request #350 from currentbits/coder/kimi-threads-started-f…