Description
My opencode is currently idle, yet it's using 30-40% CPU. Looking at the current session logs, it's written 4.3M log lines in 17 min. An session wrote 55.2M. That's hundreds/sec when idle.
Looking further, it looks that logs look like this:
INFO 2026-05-02T15:15:27 +0ms service=permission permission=skill
pattern=writing-plans ruleset=[{...},{...},...~100 entries...] evaluate
So permissions are being evaluated continuously and it's written out at the INFO level - this should be DEBUG or lower. I have a lot of skills (100+ mostly old cruft I haven't cleaned up). I also have a long list of permission rules. I asked claude to additionally diagnose:
Even "idle" opencode processes:
- Bus events fire constantly (message.part.delta, session.updated, etc.) — see hundreds in last 60s
- TUI polls server (GET /session/...)
- Each event triggers permission check → giant ruleset log line
Sample shows main thread 71% in kevent64 (event loop) + 24% in tight JS — that JS is the JSON serialization burning cycles.
Setting the log level through the env didn't work:
export OPENCODE_LOG_LEVEL=warn
I had to change it in the main opencode.jsonc config at the top-level
Plugins
No response
OpenCode version
1.14.31
Steps to reproduce
- Have a lot of skills and external directories that they're loaded from
- A large permission list:
"permission": {
"read": {
"~/.config/opencode/get-shit-done/*": "allow"
},
"external_directory": {
"~/.cache/opencode/packages/superpowers/*": "allow",
"~/.config/opencode/get-shit-done/*": "allow",
"/tmp/*": "allow"
},
"bash": {
"*": "ask",
"awk *": "allow",
"basename *": "allow",
"cat *": "allow",
"column *": "allow",
"composer *": "allow",
"cut *": "allow",
"date *": "allow",
"df *": "allow",
"dirname *": "allow",
"du *": "allow",
"echo *": "allow",
"env": "allow",
"file *": "allow",
"find *": "allow",
"find * -delete": "ask",
"find * -exec *": "ask",
"git *": "allow",
"grep *": "allow",
"head *": "allow",
"ls *": "allow",
"mkdir *": "allow",
"node *": "allow",
"php *": "allow",
"printf *": "allow",
"ps *": "allow",
"pwd": "allow",
"rg *": "allow",
"rtk *": "allow",
"sed *": "allow",
"sed --in-place": "allow",
"sed --in-place *": "allow",
"sed -i": "allow",
"sed -i *": "allow",
"sort *": "allow",
"stat *": "allow",
"strings *": "allow",
"tail *": "allow",
"test *": "allow",
"tr *": "allow",
"true": "allow",
"uniq *": "allow",
"wc *": "allow",
"which *": "allow",
"whoami": "allow"
},
"edit": "allow",
"webfetch": "allow"
}
Screenshot and/or share link
No response
Operating System
osx 26.4.1
Terminal
iterm2
Description
My opencode is currently idle, yet it's using 30-40% CPU. Looking at the current session logs, it's written 4.3M log lines in 17 min. An session wrote 55.2M. That's hundreds/sec when idle.
Looking further, it looks that logs look like this:
So permissions are being evaluated continuously and it's written out at the INFO level - this should be DEBUG or lower. I have a lot of skills (100+ mostly old cruft I haven't cleaned up). I also have a long list of permission rules. I asked claude to additionally diagnose:
Setting the log level through the env didn't work:
I had to change it in the main
opencode.jsoncconfig at the top-levelPlugins
No response
OpenCode version
1.14.31
Steps to reproduce
Screenshot and/or share link
No response
Operating System
osx 26.4.1
Terminal
iterm2