mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #145] Stuck at max token limit #77
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#77
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 @tdzard94 on GitHub (Sep 29, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/145
I ran it with pi and always stuck at this error message. I tried stop and start again but can't fix
@pdsmike commented on GitHub (Sep 29, 2026):
https://pi.dev/docs/latest/compaction
Pi's built-in auto-compaction settings are configured in ~/.pi/agent/settings.json or /.pi/settings.json
increase compaction.reserveTokens
@tdzard94 commented on GitHub (Sep 29, 2026):
thank for your help. I'll try it
@kelheor commented on GitHub (Sep 29, 2026):
I have similar problem with OpenCode CLI.
I saw:
[strata] thinking: 31910 of max 32000 tokens, 102.2 tok/s, 320 s
[strata] done: 32000 tokens in 321 s (102.2 tok/s) (length, cancel=False), expert cache 75.0% hit
and then it just stopped and I have to write "Continue"
Is there a way to increase max tokens for reasoning via some config? Also at some moment strata server stops writing output to OpenCode CLI, but continue to thinking - at least it looks like that.
@pdsmike commented on GitHub (Sep 29, 2026):
In any harness, when the LLM is in a long coding task and the context is already low it may hit the limit, that's why there is automatic compaction when certain criteria are met. Every harness has it's own settings. For OpenCode look here:
https://opencode.ai/v2/docs/compaction/
@amonpaike commented on GitHub (Sep 29, 2026):
in PI models.json I added the entry I put like this, the context is the same that I gave to strata and I have no problems
@dandandelion commented on GitHub (Sep 29, 2026):
Strata reserves some tokens after you allocate for example 131072, you need to configure your harness to use lower than that for example 128000. Usually in pi harness, they attach their max token output in their payload, and if your prompt + configured max token output exceeds the one in strata, strata will complain.
@amonpaike commented on GitHub (Sep 29, 2026):
pi also has some buffering, so the actual real context is even smaller.

@kelheor commented on GitHub (Sep 29, 2026):
I have 262k context and when it happened, it was only filled by 30k. It's a problem of strata server, I think - it looks like it has hardcoded limit of max reasoning output.
@tdzard94 commented on GitHub (Sep 29, 2026):
I think this error come from strata. I try to run same pi setting with unsloth and it work very well
@tdzard94 commented on GitHub (Sep 29, 2026):
Sometime I got this error
Error: 400: {"type":"invalid_request_error","message":"prompt (98473 tokens) + max tokens (32768) exceeds the context (131072); requests are never truncated"}
@dandandelion commented on GitHub (Sep 29, 2026):
with my pi, I've never had this problem. (Attached SS even compacted 4 times before it finishes the full stack app)

@tdzard94 commented on GitHub (Sep 29, 2026):
Maybe I need add some more config for pi. I've been using pi for 1 month lately so I am using default config. Only added local model
@Niko1221 commented on GitHub (Sep 29, 2026):
Thanks, and thanks to everyone who helped here. The 32,000 limit is the
max_tokensyour client sends; Strata stops there with finish reasonlength. Raise the client's output limit, or set"fit_max_tokens": truein the run config so Strata shrinks the cap to fit the context instead of returning a 400. Please reopen if it still stops early after that.