Repository navigation
Description
Description
Pressing Ctrl+C while the TUI's initial location-data refresh requests are still pending exits the TUI, but then prints one or more full AbortError / DOMException stack traces.
Expected behavior: Ctrl+C exits cleanly because cancellation of these requests is part of normal shutdown.
Actual behavior:
Failed to refresh default location data DOMException {
name: "AbortError",
message: "The operation was aborted.",
code: 20,
stack: "abort@[native code]\n...\nexit@..."
}
AbortError: The operation was aborted.
at /$bunfs/root/chunk-hyt09t2m.js:2
The issue is timing-sensitive and is easier to reproduce with plugins that make startup take longer. It does not indicate a real failure during use; it appears only after requesting a normal exit.
The startup handler in packages/tui/src/context/data.tsx logs every rejected refresh promise:
void Promise.allSettled([
// Eight initial refresh requests.
]).then((settled) => {
for (const failure of settled.filter((item) => item.status === "rejected"))
console.error("Failed to refresh default location data", failure.reason)
})TUI shutdown aborts the unfinished requests, so expected AbortError rejections reach console.error. The same unconditional logging is still present on the dev branch as of c2eacd72afc4a4984564c393e15ab30011057269.
Ignoring only AbortError in this startup result handler fixes the shutdown output locally while preserving reporting for actual refresh failures:
settled.filter((item) => item.status === "rejected" && item.reason?.name !== "AbortError")The related open issue #40002 reaches the same startup handler, but describes a different primary failure: an undefined location response during VSCode Remote-WSL startup rather than expected cancellation during Ctrl+C shutdown.
Plugins
@slkiser/opencode-quota@4.8.2, oh-my-openagent@4.19.4
OpenCode version
1.18.13
Steps to reproduce
-
Configure the plugins above. A minimal additional config for OMO is:
{ "$schema": "https://opencode.ai/config.json", "plugin": ["oh-my-openagent@4.19.4"] } -
Start the TUI with a fixed local server port:
OPENCODE_CONFIG=/path/to/omo.json opencode --hostname 127.0.0.1 --port 4096 -
Press Ctrl+C after the TUI appears while plugins or startup data are still loading.
-
Observe the
AbortErrorstack traces after the TUI exits. Because this is a startup race, a cold plugin cache or several attempts may make it easier to reproduce.
Screenshot and/or share link
Operating System
NixOS 26.05, Linux 7.1.4 x86_64
Terminal
Kitty 0.47.0 with tmux 3.6a (TERM=tmux-256color)
Activity
pengzh1 commentedon Aug 27, 2026
Taking this. Plan: skip AbortError rejections in the startup refresh handler (
packages/tui/src/context/data.tsx) since they're part of normal Ctrl+C shutdown, keep logging real failures. Will add tests.pengzh1 commentedon Aug 27, 2026
Withdrawing my claim — #45489 already covers this. Good luck!
neriousy commentedon Oct 19, 2026
In v2, the TUI ignores failures from background data loads once it is shutting down or has lost its server connection, and the startup handler that printed these AbortError traces no longer exists. To get v2:
npm i -g @opencode/cli@latestorcurl -fsSL https://opencode.ai/v2/install | bash(desktop: update the app). If you still see this on v2, please open a new issue with the details.