Preventing Accidental OpenCode Exits with Ctrl+C A developer has documented a configuration workaround for OpenCode that prevents accidental session loss when users press Ctrl+C out of terminal habit. By remapping the app_exit keybinding in the OpenCode configuration file to Ctrl+D or a leader-based shortcut, the interrupt command no longer closes the entire application. The change separates interrupting a running process from exiting the AI coding agent, preserving long sessions with valuable context. OpenCode is powerful, but one default behavior kept getting in my way: pressing Ctrl + C could close the application itself. If you spend a lot of time in terminals, Ctrl + C is muscle memory. You press it to interrupt a command, stop a long-running process, or simply because your hands move before you think. Losing the whole OpenCode session because of that is frustrating. The fix is simple: move the application exit action to a different keybinding. Open your OpenCode configuration file and customize the keybindings. For example: { "keybinds": { "app exit": "ctrl+d,