Agents & Coding
Four OpenCode Config Fixes You Can Paste Today
Rebind Ctrl+C, trust a host, quiet the file watcher and let the agent read .env files.
Four small edits, each one restart away.
@JayQinQT has been posting short fixes for OpenCode and other harnesses. Four from overnight:
| Problem | Fix |
|---|---|
| Ctrl+C kills the whole TUI | Ctrl+C is bound to app_exit. In ~/.config/opencode/tui.json set "keybinds": { "app_exit": "ctrl+q" }. Interrupt a session with Escape. |
| OpenCode asks every time the agent fetches a URL | In opencode.json, under "permission" → "webfetch", keep "*": "ask" and set your trusted hosts to "allow". |
| OpenCode stutters after prisma generate | A custom generated/ folder is not auto-ignored, so the watcher floods with file events. Add "watcher": { "ignore": ["**/generated/**"] }. |
| .env files cannot be read | By default .env and .env.* reads are denied, except .env.example. Set "permission": { "read": { "*.env": "ask", "*.env.*": "ask" } }. |
The .env default is a safety choice. Switching it to ask, rather than allow, keeps a prompt in front of every read.
Sources
- @JayQinQT on X · Oct 23, 4:48 AM PT
- @JayQinQT on X · Oct 22, 11:28 PM PT
- @JayQinQT on X · Oct 22, 8:53 PM PT
- @JayQinQT on X · Oct 22, 6:55 PM PT