Pressing CTRL+D (EOF) twice should terminate opencode. Claude and Codex support this idiomatic behavior.