1kimaki status
1234running: pid 4312, up 5400s, mode "gateway" opencode: {"connected":true,"url":"http://127.0.0.1:4096","version":"2.0.19"} guilds: [{"id":"123...","name":"My server"}] data dir: "/Users/me/.kimaki"
not running, start the bot with kimaki in a terminal.Discord ──> kimaki bot ──HTTP + event stream──> OpenCode 2 service (shared with your TUI)
opencode serve --service. It looks for the binary in this order:OPENCODE_PATH, if setopencode~/.opencode/bin/opencodeopencode2, only if present (rare)1curl -fsSL https://opencode.ai/v2/install | bash
| Symptom | Fix |
| Bot completely offline | Run kimaki status. If it is not running, start kimaki and read the terminal output |
Kimaki now requires OpenCode 2 at start | Install OpenCode 2 with the command above, then run kimaki again |
OpenCode ... is older than the minimum | Run opencode upgrade, then run kimaki again |
opencode is not connected in kimaki status | Restart the OpenCode service |
| Session stuck, no reply | /abort in the thread, then send the message again |
| Plugins or config changes not loaded | opencode reload |
| Threads not created, messages ignored | Check that you can use Kimaki. See Access Control |
| Bot misbehaves after a long run | kimaki restart |
port is in use at start | Another Kimaki runs. See Running multiple instances |
| Messages stop arriving when the lid is closed | Keep the Mac awake |
12opencode service status opencode service restart
opencode on your machine is still OpenCode 1, install OpenCode 2 with the command above.opencode reload reloads the configuration without a restart, but it cancels pending questions and permission requests.1kimaki restart
kimaki command supervises the bot process. kimaki restart stops the bot and starts it again with the code on disk. Sessions keep running in OpenCode, and the bot shows their output again after the restart.kimaki command.12npm i -g kimaki@latest kimaki restart
kimaki restart starts the same script path again. If you started the bot with npx, stop it and run npx -y kimaki@latest instead.caffeinate -s. This keeps the Mac awake only on the power adapter. On battery, a closed lid still puts the Mac to sleep.1sudo pmset -a disablesleep 1
1sudo pmset -a disablesleep 0
12345# print the log file path kimaki logs # print the log and follow new lines kimaki logs --follow
~/.kimaki/kimaki.log by default, or <dataDir>/kimaki.log with --data-dir. It resets on every bot start, so it only has the current run. Look for error lines near the bottom.12kimaki session events <sessionId|threadId> > ./tmp/events.jsonl jq -r .event.type ./tmp/events.jsonl | sort | uniq -c
12345# record for 20 seconds (default), Ctrl+C stops early kimaki profile cpu # record for 1 minute kimaki profile cpu --duration 1m
.cpuprofile file to <dataDir>/profiles/ and prints its path.12# top functions by self-time bunx profano ~/.kimaki/profiles/*.cpuprofile
.heapsnapshot file in Chrome DevTools, Memory tab.1kimaki profile heap