You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows crash path: session with parallel oh-my-opencode tools ends in Bun 1.3.9 segfault #1955
On Windows, an OpenCode session with oh-my-opencode active crashed with a Bun segmentation fault while multiple plugin-exposed tools were running.
I believe the low-level fault is in Bun, but this issue is being filed here because oh-my-opencode was in the active tool path and had just been auto-updated before the crash.
Environment
OpenCode CLI: 1.2.6
Bundled Bun: 1.3.9 (cf6cdbbb)
oh-my-opencode: updated from 3.7.3 to 3.7.4 immediately before the failing run
OS: Windows 11 x64
Crash Signature
panic(thread ...): Segmentation fault at address 0xFFFFFFFFFFFFFFF8
Segmentation fault at address 0xFFFFFFFFFFFFFFFF
Bun stack references include JSBlobConstructor::construct and base64/Request paths.
Creates subagent sessions via OpenCode client (lines 61-78)
Uses promptWithModelSuggestionRetry for fire-and-forget launches (line 136)
No explicit rate limiting or backpressure on Windows
The Crash Context
From your report:
4 background subagents (task tool)
6 other concurrent tools (session_search ×2, glob, grep, ast_grep_search ×2)
Auto-update occurred from 3.7.3 → 3.7.4 immediately before crash
Critical observation: The Bun stack trace references JSBlobConstructor::construct and base64/Request paths. The LSP workaround exists because Bun.spawn() segfaults on Windows, but the background task system uses OpenCode's session creation API (via HTTP), not direct Bun.spawn.
Auto-Update Mechanism
The auto-update checker (src/hooks/auto-update-checker/) fetches npm registry data and writes to cache, but doesn't auto-apply updates. The update you experienced was likely external (npm install). No auto-update race protection exists currently.
Findings Summary
Area
Status
Notes
Bun.spawn() on Windows
Mitigated
LSP uses Node.js child_process
Concurrent notifications
Mitigated
Conflict detection exists
Background task limits
Configurable
Default 5/model, not Windows-specific
Auto-update races
No protection
No coordination with task execution
Base64/request heavy paths
No wrappers
No defensive abstraction
Suggested Next Steps
Maintainers should investigate:
Windows-safe concurrency defaults — Consider lowering defaultConcurrency to 2-3 on Windows, or adding a windows_safe_mode config flag
Startup grace period — Delay background task execution by 2-3 seconds after plugin initialization (post-update stability)
Request/blob path audit — Tools using heavy base64 or blob operations (session_search, ast_grep) may need Windows-specific throttling
Backpressure signals — When >N tasks queued, inject warning to main session suggesting sequential execution
Bun version check — If Bun <1.3.10 detected on Windows, warn about known segfault issues
This is a complex crash requiring maintainer attention. The user-requested mitigations are reasonable defensive measures even if the root cause is in Bun.
Hi @TiidSizaan, thanks for the detailed crash report.
You're right that this is fundamentally a Bun runtime issue (the segfault in JSBlobConstructor::construct and base64/Request paths is in Bun's internals). However, your suggestions for reducing exposure in oh-my-opencode are valid:
Concurrency throttling - We could add backpressure when spawning many parallel tools/subagents
Auto-update race avoidance - Good point about update-then-immediate-heavy-work patterns
Defensive wrappers - Worth investigating around blob/base64 heavy paths
A few questions to help prioritize:
Is this crash reproducible or a one-off?
Does it happen only with oh-my-opencode 3.7.4, or also with earlier versions?
Any pattern to the "deep analysis prompts" that trigger it (particular tool combinations)?
Creates subagent sessions via OpenCode client (lines 61-78)
Uses promptWithModelSuggestionRetry for fire-and-forget launches (line 136)
No explicit rate limiting or backpressure on Windows
The Crash Context
From your report:
4 background subagents (task tool)
6 other concurrent tools (session_search ×2, glob, grep, ast_grep_search ×2)
Auto-update occurred from 3.7.3 → 3.7.4 immediately before crash
Critical observation: The Bun stack trace references JSBlobConstructor::construct and base64/Request paths. The LSP workaround exists because Bun.spawn() segfaults on Windows, but the background task system uses OpenCode's session creation API (via HTTP), not direct Bun.spawn.
Auto-Update Mechanism
The auto-update checker (src/hooks/auto-update-checker/) fetches npm registry data and writes to cache, but doesn't auto-apply updates. The update you experienced was likely external (npm install). No auto-update race protection exists currently.
Findings Summary
Area
Status
Notes
Bun.spawn() on Windows
Mitigated
LSP uses Node.js child_process
Concurrent notifications
Mitigated
Conflict detection exists
Background task limits
Configurable
Default 5/model, not Windows-specific
Auto-update races
No protection
No coordination with task execution
Base64/request heavy paths
No wrappers
No defensive abstraction
Suggested Next Steps
Maintainers should investigate:
Windows-safe concurrency defaults — Consider lowering defaultConcurrency to 2-3 on Windows, or adding a windows_safe_mode config flag
Startup grace period — Delay background task execution by 2-3 seconds after plugin initialization (post-update stability)
Request/blob path audit — Tools using heavy base64 or blob operations (session_search, ast_grep) may need Windows-specific throttling
Backpressure signals — When >N tasks queued, inject warning to main session suggesting sequential execution
Bun version check — If Bun <1.3.10 detected on Windows, warn about known segfault issues
This is a complex crash requiring maintainer attention. The user-requested mitigations are reasonable defensive measures even if the root cause is in Bun.
Thanks for the report. I cannot move this forward confidently yet because key reproduction detail is still missing.
Please reply with:
exact versions: oh-my-openagent, opencode, bun
provider + model + agent/variant used
minimal reproduction steps from a clean session
relevant config snippet with secrets redacted
bunx oh-my-openagent doctor output and any error logs/screenshots
Please confirm whether this still reproduces on the latest Bun/OpenCode/plugin versions, and include the crash log or stack trace if you still have it.
call_omo_agent tool (src/tools/delegate-task/) routes to agents by subagent_type.
There is no subagent_instance_id or per-instance routing.
Multiple instances of the same agent would share state unless isolated by session ID.
Adding instance routing would require:
A new parameter in call_omo_agent.
Session isolation per instance.
State management for multiple instances.
Action
Labels: enhancement, triage:feature-request (already set). No label change.
Keep open. Assigning code-yeongyu for the architecture decision: whether to support multi-instance agents or to rely on team-mode for parallel execution.
[sisyphus-dev] Sweep status: I am leaving this assigned/open rather than patching. The crash signature is a Bun 1.3.9 Windows segfault in runtime internals, and the suggested OMO-side mitigations (Windows-safe concurrency defaults, startup grace, request/blob throttling) are behavior and architecture policy. I do not have a current-version deterministic repro tying this to a specific OMO code path, so this needs owner/runtime direction rather than a sweep fix.
Activity
code-yeongyu commentedon Feb 19, 2026
[sisyphus-bot] Bug Analysis: Windows Bun Segfault with High Concurrency
Thanks for this detailed report, @TiidSizaan. I analyzed the codebase and found several relevant areas:
Current Windows-Specific Handling
The codebase already has some Windows-specific mitigations in place:
LSP Process Spawning (
src/tools/lsp/lsp-process.ts)child_processinstead ofBun.spawn()on WindowsExternal Plugin Conflict Detection (
src/shared/external-plugin-detector.ts)Signal Handling (
src/features/skill-mcp-manager/cleanup.ts)Background Task Concurrency System
The crash occurred during heavy parallel tool usage. Here's how concurrency is managed:
Concurrency Manager (
src/features/background-agent/concurrency.ts)background_task.defaultConcurrency,providerConcurrency,modelConcurrencyBackground Task Spawning (
src/features/background-agent/spawner.ts)promptWithModelSuggestionRetryfor fire-and-forget launches (line 136)The Crash Context
From your report:
tasktool)session_search×2,glob,grep,ast_grep_search×2)Critical observation: The Bun stack trace references
JSBlobConstructor::constructand base64/Request paths. The LSP workaround exists becauseBun.spawn()segfaults on Windows, but the background task system uses OpenCode's session creation API (via HTTP), not direct Bun.spawn.Auto-Update Mechanism
The auto-update checker (
src/hooks/auto-update-checker/) fetches npm registry data and writes to cache, but doesn't auto-apply updates. The update you experienced was likely external (npm install). No auto-update race protection exists currently.Findings Summary
Suggested Next Steps
Maintainers should investigate:
defaultConcurrencyto 2-3 on Windows, or adding awindows_safe_modeconfig flagsession_search,ast_grep) may need Windows-specific throttlingThis is a complex crash requiring maintainer attention. The user-requested mitigations are reasonable defensive measures even if the root cause is in Bun.
/cc @code-yeongyu
sisyphus-dev-ai commentedon Feb 20, 2026
Hi @TiidSizaan, thanks for the detailed crash report.
You're right that this is fundamentally a Bun runtime issue (the segfault in
JSBlobConstructor::constructand base64/Request paths is in Bun's internals). However, your suggestions for reducing exposure in oh-my-opencode are valid:A few questions to help prioritize:
I've labeled this for tracking. The Bun team should definitely see the report at https://bun.report/1.3.9/wa1cf6cdbbmxGz+3/9/D4j0/fksz/f8y+9oB68lu1B0oku1B035t1Bmxut1B64wq1Bs/vq1Bi954wBm4x/xB8nx/xBsg1p5By0zp5B8279Uw5vrTs1n2wBsx/wwB6mt+d2ozypBA2DD
Thanks for the thorough diagnostics!
code-yeongyu commentedon Mar 2, 2026
[sisyphus-bot] Bug Analysis: Windows Bun Segfault with High Concurrency
Thanks for this detailed report, @TiidSizaan. I analyzed the codebase and found several relevant areas:
Current Windows-Specific Handling
The codebase already has some Windows-specific mitigations in place:
LSP Process Spawning (
src/tools/lsp/lsp-process.ts)child_processinstead ofBun.spawn()on WindowsExternal Plugin Conflict Detection (
src/shared/external-plugin-detector.ts)Signal Handling (
src/features/skill-mcp-manager/cleanup.ts)Background Task Concurrency System
The crash occurred during heavy parallel tool usage. Here's how concurrency is managed:
Concurrency Manager (
src/features/background-agent/concurrency.ts)background_task.defaultConcurrency,providerConcurrency,modelConcurrencyBackground Task Spawning (
src/features/background-agent/spawner.ts)promptWithModelSuggestionRetryfor fire-and-forget launches (line 136)The Crash Context
From your report:
tasktool)session_search×2,glob,grep,ast_grep_search×2)Critical observation: The Bun stack trace references
JSBlobConstructor::constructand base64/Request paths. The LSP workaround exists becauseBun.spawn()segfaults on Windows, but the background task system uses OpenCode's session creation API (via HTTP), not direct Bun.spawn.Auto-Update Mechanism
The auto-update checker (
src/hooks/auto-update-checker/) fetches npm registry data and writes to cache, but doesn't auto-apply updates. The update you experienced was likely external (npm install). No auto-update race protection exists currently.Findings Summary
Suggested Next Steps
Maintainers should investigate:
defaultConcurrencyto 2-3 on Windows, or adding awindows_safe_modeconfig flagsession_search,ast_grep) may need Windows-specific throttlingThis is a complex crash requiring maintainer attention. The user-requested mitigations are reasonable defensive measures even if the root cause is in Bun.
/cc @code-yeongyu
code-yeongyu commentedon Apr 6, 2026
Triage
Thanks for the report. I cannot move this forward confidently yet because key reproduction detail is still missing.
Please reply with:
oh-my-openagent,opencode,bunbunx oh-my-openagent doctoroutput and any error logs/screenshotsPlease confirm whether this still reproduces on the latest Bun/OpenCode/plugin versions, and include the crash log or stack trace if you still have it.
code-yeongyu commentedon May 16, 2026
[sisyphus-bot]
Read-only triage on
dev.Current state
call_omo_agenttool (src/tools/delegate-task/) routes to agents bysubagent_type.subagent_instance_idor per-instance routing.call_omo_agent.Action
enhancement,triage:feature-request(already set). No label change.code-yeongyufor the architecture decision: whether to support multi-instance agents or to rely on team-mode for parallel execution.code-yeongyu commentedon Jun 2, 2026
[sisyphus-dev] Sweep status: I am leaving this assigned/open rather than patching. The crash signature is a Bun 1.3.9 Windows segfault in runtime internals, and the suggested OMO-side mitigations (Windows-safe concurrency defaults, startup grace, request/blob throttling) are behavior and architecture policy. I do not have a current-version deterministic repro tying this to a specific OMO code path, so this needs owner/runtime direction rather than a sweep fix.