Preserve OpenHands context budget - #927
Conversation
|
Daily scan hygiene (2026-07-13): added rollout/eval tracking labels while this remains a draft PR. Current state:
Labels: |
|
Users Simulation automation review (2026-07-13): behavior-ready, but still draft/in-progress on head Scope checked: OpenHands settings generation, context/output budget propagation, summarizing condenser setup, manifest-neutral install/launch behavior, CLI/SDK regression risk, and artifact health. Evidence:
Artifact health:
Thermo-nuclear review: no blocker from this diff. The PR edits an already-large registry file, but the new settings writer is cohesive and avoids scattering context-budget branches across rollout code. I left labels as draft |
|
Users Simulation automation review (2026-07-16): blocked by draft/dirty state and one new user-facing CLI drift on head Behavioral OpenHands context-budget validation is healthy, and the existing
Passing evidence from isolated review: OpenHands/context focused tests Moving labels to |
|
Re: #927 (comment) Pushed
Validation:
Updated labels from |
|
Users Simulation automation review (2026-07-17): behavior-ready, still draft/in-progress on head The current head clears the previous automation blockers:
Remaining before merge-ready: the PR is still draft, and the new regression tests in Label state synced to |
|
Users Simulation automation review (2026-07-23): blocked on current head What still passes:
Blocking behavior regression:
Repo-convention blocker:
Recommended fix: migrate the timeout/reasoning/subagent-disable behavior into the settings-writer/override path, add regression coverage for those env vars, and add PR #927 guard docstrings. Keeping this blocked until then. |
|
Re: #927 (comment) Pushed two commits to clear the current user-simulation blockers on PR #927:
Regression coverage now includes PR #927 guard docstrings in Validation:
Updated labels from |
|
Users Simulation automation review (2026-07-25): behavior-ready by simulation, still draft/in-progress on current head What now passes:
Artifact gate:
Recommendation: keep AI-generated automation review posted on behalf of Bingran You. |
What changed
Agentsettings file instead of only the minimal LLM routeBENCHFLOW_OPENHANDS_CONTEXT_LIMITandBENCHFLOW_OPENHANDS_OUTPUT_LIMITare setLLMSummarizingCondenserwithBENCHFLOW_OPENHANDS_CONTEXT_RESERVE(default 4096)install_cmdandlaunch_cmdbyte-identical to the external agent manifest by modeling the compatibility hooks as shim-only fieldsRoot cause
BenchFlow wrote only
llm.model,llm.api_key, and optional provider fields toagent_settings.json. That bypassed the OpenHands CLI's default agent construction and leftcondenser=Noneplus no explicit input/output limits. A long rollout reached 262,216 input tokens against a 262,144-token endpoint and ended in a provider context-window rejection instead of condensing first.Behavior
With context 262144, output 32768, and the default 4096 reserve, condensation starts at 225280 tokens. Existing provider URL and optional LiteLLM boolean flags are preserved. When limits are omitted, the writer still restores the normal summarizing condenser without inventing a token threshold.
Validation
benchflow-ai/agents@mainmanifestsAgent, input 262144, output 32768,LLMSummarizingCondenser, trigger 225280<think>leaksThe production experiment patch was deployed only to newly launched jobs; existing active jobs were not restarted.
Latest automation follow-up (2026-07-23)
3f14b1f55to clear the current user-simulation blockers fromhttps://github.com/benchflow-ai/benchflow/pull/927#issuecomment-5058266206:src/benchflow/agents/openhands_settings_writer.py;LLM_TIMEOUT,LLM_REASONING_EFFORT(max, typed efforts, and untyped values), andBENCHFLOW_OPENHANDS_DISABLE_SUBAGENTS=1;8d1106c84to clear the new exact-headpip-auditfailure by lockingmcp==1.28.1forCVE-2026-59950.226 passed, 2 skipped), runtime/rollout install-adjacent slice (28 passed, 3 skipped),ruff check .,ruff format --check src tests,ty check src,uv lock --check, and the exact CIpip-auditcommand.8d1106c844928cedd5b68248d4e55269047d20b6:test,pip-audit,manifest-parity / parity, andintegration-light / rollout-smokepass.integration-light-jobsartifact from run30010209498passedbenchflow-experiment-review: 1/1 rollout healthy, ACP + LLM trajectories present, training-readyresults.jsonl, reward present, 284,890 tokens, 14 tool calls, and 16/16 LLM responses with usage.