mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1648] Fail to use strata on opencode due to long prompt. #664
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#664
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RNGMARTIN on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1648
I can use smoothly in the web page of strataA(details are in the picture) . However, after connecting to opencode, due to opencode's own build and plan model, which has its own long prompt, the log of strata shows the engine stopped unexpectedly after 60 seconds ... and restart itself, cannot work in opencode. what's the problem?

@Coderx7 commented on GitHub (Oct 9, 2026):
I thought it was only me! the strata webui is blazingly fast but the opencode wouldnt work!
@VenimK commented on GitHub (Oct 9, 2026):
OpenCode 1.18.35 only reads a provider block (npm, options).
"provider": {
"yourmodelid": {
"name": "your model name",
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "youbaseurl",
"apiKey": "yourapikey"
},
"models": {
"qwen3.8-flash-next-iq2_xs": {
"name": "Qwen3.8 Flash Next IQ2_XS",
"attachment": true,
"tool_call": true,
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 262144,
"input": 262144,
"output": 65536
}
}
}
}
},
@RNGMARTIN commented on GitHub (Oct 9, 2026):
exactly. I dont know why.
@RNGMARTIN commented on GitHub (Oct 9, 2026):
my opencode version is 2.0.26
@Coderx7 commented on GitHub (Oct 9, 2026):
I also was on the latest opencode, after a few try when I noticed its not working, I ditched it completely and went straight ahead to deepseek harness. its working amazingly well.
@Niko1221 commented on GitHub (Oct 10, 2026):
Thanks all. From the log screenshot alone we cannot tell why the engine stops, so we need a few facts. "The engine stopped unexpectedly" means the engine process ended during the request, and the number in brackets (exit code) says how. -9 or 137 means the system killed it for lack of memory; a crash gives another code. The server then starts it again by itself, which looks like a restart loop.
Could one of you who sees this (RNGMARTIN, since you opened the issue) post:
the engine stopped unexpectedly (exit code ...)and the 30 lines of the server window before it.strata.jsonor the command line), especially the context size and --prefill.free -h), and on Linuxsudo dmesg | grep -i -E 'killed process|out of memory'.reading the prompt: N of M tokenswhile it works; please include those lines too.For reference, Strata's server works with other clients that send long prompts, so this looks specific to a setup or to memory, and the data above should show which.
@RNGMARTIN commented on GitHub (Oct 12, 2026):
The problem was reproduced today (2026-10-12, 09:22 local time) with engine 0.1.40.3.
A normal request sent through OpenCode hung with no output; the engine then stopped
and the server brought a new engine up (visible in the server window as a restart).
Below are the requested facts.
====================================================================
before "the engine stopped unexpectedly (exit code ...)"
====================================================================
The line the client saw corresponds to this in the server log (strata-iq2_xs.log):
The 30 lines immediately before it (abridged only where marked):
Notes:
was unresponsive: all 15 expert-pool workers sleeping, host idle for 60 s, in
"reading the prompt (batched): layer 1 of the prompt chunk from token 0".
show strata.exe crashes, exception code 0xc0000409 (STATUS_STACK_BUFFER_OVERRUN),
fault offset 0x4eb1e9 - not an OOM kill (-9/137). Nine stall dump files exist
(strata-stall-*.dmp); the newest one is from today's reproduction.
====================================================================
2. Strata version, OS, GPU and VRAM, total RAM, model
AVX-2)
Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf (36.5 GB) and
Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf (26.8 GB), i.e. a 63.3 GB
model pair, matching the config. An IQ3_XXS pair is also on disk but not used.
====================================================================
3. The command line / config, especially context size and --prefill
Server start (run-iq2_xs.bat):
Engine command line exactly as logged by the server:
So: --prefill is "auto" (it chose the batched path, "prompt chunk auto: 8192
tokens"), context size is 131072. The server listens on 0.0.0.0:8080 with an API
key set. One extra detail from the log:
"large pages refused for 35456548864 B (VirtualAlloc error 1314); using 4 KB
pages" - the ~35 GB expert arena runs on 4 KB pages.
====================================================================
4. Free RAM while it happens / OOM check
5565 MiB RAM available, over 10.6 million page faults so far.
effectively 0 GB at the time. Working sets: strata.exe 37.2 GB, WSL
(vmmemWSL) 7.3 GB, PyCharm 2.3 GB, Memory Compression 0.8 GB.
there is no record of the OS killing a process for lack of memory. The engine
stop is the 60 s stall watchdog (issue #29), not an OOM kill; there is no
-9/137 exit code involved in today's event.
====================================================================
5. Does a long prompt (about the size of OpenCode's, 10-20K tokens)
work from the web page / API?
Yes, and this is the strange part:
(9357 read in 9.1 s at 1031 tok/s, 64 generated in 1.8 s)
All of these succeeded back to back. The very next OpenCode request (the actual
conversation prompt, larger than the 588-token one) then froze at "reading the
prompt (batched): layer 1" for 60 s with zero progress and no recovery. So it is
not simply "the prompt is too long" - the failure came after several successful
requests, when free RAM had dropped to ~0 GB.
====================================================================
6. Is the engine dying, or is the client giving up?
The engine side is the problem in today's reproduction: during an in-flight
request the engine made no progress for 60 s (all 15 expert-pool workers
sleeping, host idle 60 s, GPU waits already released). The client (OpenCode)
kept waiting and saw no output; the engine then had to be stopped, which is what
the client reported.
Additional observation from the same log, in case it matters: model loading ran
at 0.15 GiB/s with the hint "~24x below what this hardware streams from a normal
launch" (possible process-priority throttling). This may be related to the stall.
@RNGMARTIN commented on GitHub (Oct 12, 2026):
@Niko1221 I request in opencode, it automatically start two requests: one is named the title of this request while the other is the actual request. From the log, the title of this request is successfully named(the 588 prompt one). After this, the strata start the process of the actual request(the 8431 prompt one),and after 120s have this problem and restart itself. The basic information and test result is above. Hope to resolve the problem. Thanks a lot.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.