-
Pool all AI subscriptions with Subrouter:
/loginnow shows Subrouter first. Add multiple accounts from multiple providers, then usesubrouter/defaultor a custom preset. Subrouter first rotates accounts inside one provider, then moves to the next provider.model: subrouter/default │ ▼ anthropic/claude-opus-4-6 ──429──▶ second Claude account │ ▼ openai/gpt-5.5 │ exhausted ▼ xai/grok-4.6Cooldowns are shared by all sessions on the machine. Subrouter uses
retry-afterorretry-after-mswhen the provider sends one, including zero. Without a usable retry delay, the fallback is five minutes. A402balance-exhausted response uses a six-hour cooldown.npx -y @subrouter/cli status npx -y @subrouter/cli cooldown clear npx -y @subrouter/cli preset create fast \ --models 'anthropic/claude-opus-4-6,xai/grok-4.6'Kimaki also shows the current routed model in
/modeland final footers. Published builds register the exact@subrouter/opencodepackage identity, so OpenCode deduplicates Kimaki and user plugin declarations. Rate-limited task subagents stay active so Subrouter can finish account rotation or cross-provider failover. Existingkimaki multioauthcommands remain available as legacy single-provider rotation. -
Put sessions to sleep and resume them later: the new
kimaki_sleeptool lets a session pause for hours or days, go idle without using tokens, and wake in the same session with its full conversation history.Ask for it in plain language:
deploy is running, check back in 2 hours and confirm it went green
The tool accepts either a relative
durationor an absolute UTCuntilvalue:duration: 30s | 10m | 2h | 1d until: 2030-01-01T09:00:00Z reason: waiting for the deploySleeps survive bot restarts because they are stored in SQLite. Delivery uses a stable Discord-compatible nonce and retries safely. A new chat message,
/queue,/abort, a slash command that starts a new turn, orkimaki sendcancels the pending sleep./btwdoes not cancel it because/btwstarts a separate side conversation. -
Merge worktrees with rebase or squash:
/merge-worktreenow offers Keep commits (rebase) and Squash into one commit strategies. Squash mode rebases first, then creates one target commit, so the existing agent-assisted conflict flow still works./merge-worktree strategy:Squash into one commit target-branch:mainThe same merge pipeline is available from the root CLI:
kimaki merge-worktree --strategy squash --target-branch main
If a rebase has conflicts, Kimaki asks the agent to resolve them, continue the rebase, and retry the command. A successful retry clears the worktree marker from the Discord thread title. Completion messages include the source commit count.
-
Coordinate concurrent sessions from the CLI: active-session filtering, file editor attribution, and explicit title updates make parallel agent work easier to manage.
kimaki session list --active while kimaki session list --active \ --exclude "$CURRENT_SESSION_ID"; do sleep 5 done kimaki session editors src/cli.ts kimaki session editors src/cli.ts --json kimaki session title 'Fix queue draining' --session ses_xxx
--activeincludes each selected session status and exits with status1when no matching active sessions remain. Editor tracking records successfuledit,write, andapply_patchcalls. Session title updates change the OpenCode title, and the mapped Discord thread follows it. -
Expose the OpenCode server for remote attachment: add
--opencode-hostnameand--opencode-portfor remote OpenCode clients.OPENCODE_SERVER_PASSWORD=replace-me \ kimaki --opencode-hostname 0.0.0.0 --opencode-port 4096 opencode attach http://YOUR_VPS_IP:4096 --password replace-me
These flags only control the OpenCode child server. Kimaki's lock and Hrana servers remain on
127.0.0.1. Kimaki refuses a non-loopback OpenCode bind ifOPENCODE_SERVER_PASSWORDis missing.OPENCODE_SERVER_USERNAMEdefaults toopencode. Without these flags, Kimaki explicitly binds OpenCode to127.0.0.1on a random free port. -
Validate CLI model IDs before work starts: Kimaki now validates
--modelagainst OpenCode's live provider and model list before sending prompts, creating or editing tasks, and starting sessions.kimaki send \ --model anthropic/claude-opus-4-6 \ --prompt 'review this' kimaki task edit 12 --model openai/gpt-5.4Invalid values fail immediately with provider or similar-model hints. The required format is
provider/model. An empty--modelvalue ontask editstill clears the task override. -
Notify thread creators when final work completes: the final session footer now mentions the thread creator, which creates a Discord completion notification. Intermediate footers stay silent while queued messages remain.
Use the new root flag to keep final footers visible without mention notifications:
kimaki --skip-footer-mentions
Footer mentions remain enabled by default.
-
Add a ground-truth bug-report workflow: the public guide covers event-stream export, logs, session Markdown, exact prompts, exact model IDs, and secret gists.
kimaki session export-events-jsonl \ --session ses_xxx \ --out ./tmp/ses_xxx.jsonl kimaki session read ses_xxx > ./tmp/ses_xxx.md kimaki --version
kimaki session readnow includes the exactproviderID/modelIDin each assistant heading. -
Repair incomplete
kimaki@0.26.0npm installations: standard npm installs now declare@subrouter/opencodeas a runtime dependency. The generatedschema.sqlalso matches every table in the current Drizzle schema and includessession_sleeps. Regression tests cover both package contracts. Fixes #199. -
Keep AskUserQuestion prompts available and correctly ordered: AskUserQuestion dropdowns no longer expire after ten minutes. A question remains active until the user answers it, sends a newer message, or runs
/abort.Assistant text emitted before a question now appears before the dropdown and before a queued
» user:handoff. If Kimaki restarts and retains an old unansweredquestion.askedevent, a newer user turn makes that old question inactive./abortclears the pending dropdown. If Discord cannot send the dropdown, Kimaki clears its context and aborts the blocked OpenCode session. Permission prompts still keep their configurable timeout. Fixes #192. -
Keep worktree creation bound to the correct checkout: worktree setup now binds each request to the exact registered project checkout and resolved commit SHA. Kimaki verifies the Git common directory, linked-worktree identity, requested
HEAD, and submodule ownership before the session starts. A mismatch is cleaned up and reported instead of starting work in an independent clone of the same remote.Kimaki also copies the source model, applies permissions, and binds the forked OpenCode session before the worktree becomes usable. An immediate message can no longer race setup and start a replacement session with the channel default model.
-
Recover from Discord outages and stuck self-restarts: Discord connect timeouts and temporary Undici socket errors now use a temporary-failure exit code. The restart wrapper retries with progressive backoff and does not count a long network outage as a crash loop.
Self-restarts also have a 15-second exit deadline. If cleanup finishes but Node hangs while joining native worker threads, Kimaki force-kills the correct child generation and continues the restart. Thanks @Cyberlane for #190.
-
Show delegated tasks when they start: Kimaki now posts each delegated task line as soon as OpenCode marks it running. It no longer waits for a child session ID, so large task batches show tasks that are waiting for an OpenCode subagent slot.
OpenAI task names can come from
state.titleinstead ofinput.description; Kimaki supports both:┣ general **Classify pending changes**Completed task events do not post a late duplicate after the agent's follow-up text.
-
Route resumed sessions to the current Discord thread:
/resumecan map one OpenCode session to several historical Discord threads. Reverse lookup now selects the most recently bound thread.kimaki_file_upload,kimaki_action_buttons, sleep wakes, and other session-to-thread operations no longer post into an old thread and wait for interaction there. -
Keep sessions running when threads are archived: archiving a Discord thread no longer aborts its mapped OpenCode session. Active work and queued prompts continue in order.
To stop the run explicitly:
kimaki session abort <session-id>
-
Keep video uploads out of voice transcription:
.mov,.mp4, and other video attachments are no longer treated as voice notes only because Discord includes a duration. Voice notes and uploaded audio (.ogg,.m4a,.mp3,.wav,.oga,.opus) still transcribe. -
Render compact callouts correctly: single-line callout blocks now render as Discord Components V2 containers instead of showing raw tags.
<callout accent="#f59e0b">Confidence: high.</callout>
Callout syntax inside fenced code remains literal. Nested, adjacent, or malformed one-line callouts remain plain text instead of producing an incorrect container.
-
Show useful worktree merge failures:
/merge-worktreeandkimaki merge-worktreenow show the failed Git command, exit code, stderr, stdout when useful, and remaining cause details. When the final local target update fails after a successful rebase, Kimaki explains that the worktree rebase is preserved, the local target branch was not updated, and no push to origin occurred. -
Count delegated task tokens accurately: Strada
tokens_usedevents now include billed usage from task child sessions, not only the parent session. Child idle events report their own usage, while the parent reports any remaining child delta without double-counting.
Thanks @Cyberlane for #190.