mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3684] [CLOSED] [GUI] Preserve Output Room In Small Agent Contexts #4749
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#4749
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3684
Author: @medking82
Created: 10/22/2026
Status: ❌ Closed
Base:
main← Head:codex/agent-output-budget-20261022📝 Commits (2)
2ee3fbefix(gui): preserve output room in small agent contextsf273ef6fix: preserve output room after small-context tool calls📊 Changes
9 files changed (+903 additions, -0 deletions)
View changed files
➕
apps/desktop/scripts/harness-budget.mjs(+52 -0)📝
apps/desktop/scripts/stage-harness.mjs(+5 -0)📝
apps/host/server/agent/README.md(+11 -0)➕
apps/host/server/agent/output-budget-native-webview.png(+0 -0)➕
apps/host/server/agent/output-budget-validation.json(+459 -0)➕
apps/host/server/agent/output-budget-validation.md(+152 -0)➕
apps/host/tests/fixtures/pi-ai-1.1.0-simple-options.js.fixture(+73 -0)➕
apps/host/tests/fixtures/pi-ai-LICENSE(+25 -0)➕
apps/host/tests/harness-budget.test.mjs(+126 -0)📄 Description
Problem and result
At 8K Context, App 0.2.2's default agent can stop during thinking without an answer. The earlier draft also reproduced this after a successful
read: its follow-up request hadmax_completion_tokens: 1although the native prompt used only 6722 tokens. The final staged candidate completes the same tool turn and displaysREADY-3684in the official native App (stop; follow-up cap 242).Related discussion
Related App 0.2.2 acceptance: #3365 and #3373. This is a focused output-budget fix for the existing default agent.
Approach
The existing Harness staging step applies a guarded pi-ai 1.1.0 correction to its copied dependency. Below 64K, safety padding is at most one sixteenth of the window and half the estimated remaining room. Caller caps and the one-token no-room floor remain; 64K+ keeps the previous 4096-token calculation. Exact dependency version/source hashes and standalone-file checks guard the patch, and
BUNDLE.json.patchesrecords provenance.Validation
Passed:
57190202: fresh frozen install, full build (9 build gates), production deploy, flatten/prune/import checks, staged--version, and authenticated web-profile boot.read→READY-3684, withagent: true,demo: false, 8K, Manual, Medium and all 26 tools. First/follow-up wire caps 298 / 242.stop, final context 7106 tokens; no error, empty answer or one-token request.Failed:
1instead of221; the earlier real follow-up also ended empty withlength. Both drove the revised fix. No final functional check failed.Not run:
Limits
The common clamp affects small windows across protocols; live model coverage is the local OpenAI chat route on Windows. The 8K conversation coverage is bounded. Cached prompt tokens were reused, so there is no performance claim. The correction ships with a newly staged component; installed Harness files are unchanged.
Source-bound report and exact commands · machine-readable receipts · actual native WebView2 capture.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.