mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1982] Field report: Codex CLI as a coding agent on Strata — same fix in 36% less time by changing how the agent works (greedy default, Codex output truncation) #789
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#789
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 @fioruccione on GitHub (Oct 11, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1982
I gave one real coding task to Codex CLI on Strata and to GPT-6.1 in the cloud, repeating it on the same starting code. The aim was not more tokens per second but getting the local model to reach the same result in fewer steps. Changing how the agent works cut wall time by 36 % with the same model, server and quality. On the way we found two settings that other Codex users on Strata may want to know about.
Setup. Strata v0.1.40, Qwen3.8 Flash-Next UD-IQ4_XS, 262,144 context,
--kv int8, MTP--spec 4, one slot, 2× RTX 4060 Ti 16 GB, Threadripper PRO 3975WX. Codex CLI 0.162.0 (Responses API), reasoning effortmedium.The task. One round of 13 fixes on a ~4,000-line Python CAD tool with a FreeCAD backend:
Each fix needed a failing test first. The same external black-box script checked every result on 13 behaviours, and the full existing suite was rerun independently.
Every run missed the same check: the export folder replaced by a symlink. Every run fixed the other symlink cases, and the baseline caught this one only in its final review pass.
Findings
The gap is the number of steps, not speed or depth per step.
Codex truncates tool output for custom providers.
max_output_tokens: 30000.tool_output_token_limit = 25000in the Codex config, the default becomes ~10k tokens and up to 25k on request.On v0.1.40, with no
samplingblock, decoding is greedy.Codex "code mode" did not suit this model.
Buffer,requireorbtoa; patches inside JS strings) produced 41 failed scripts.What worked was telling the agent how to work (in
AGENTS.md):The effect:
Each turn now reasons more (~1,300 vs ~770 generated tokens), so total time fell by about a third, not by half.
Stability
Six sessions on Strata, 78 to 128 minutes each, with 172 to 388 model calls and 9 context compactions in total (prompts up to ~236k tokens). In none of them was there a server error or hang, a reasoning loop, a lost thread after a compaction, or broken code at the end. Every run ended with the full suite green.
Caveats
Thanks for Strata: running a ~88 GiB MoE as a two-hour coding agent on two 16 GB cards is something.
@fioruccione commented on GitHub (Oct 12, 2026):
Correction and follow-up (12 Oct). Same task, same base commit, same prompt, Strata v0.1.40, no sampling block.
Greedy runs are not reproducible over long sessions. I wrote above that they are. That was wrong. I repeated run 5 with nothing changed. The two runs diverge in the very first reasoning item, after 137 identical characters ("Let's begin." vs "Let me run commands."), and from there they take different paths. This is probably numeric: two near-tied tokens, with experts computed partly on GPU (cached) and partly on CPU. One run per setup is therefore not enough, greedy included.
strata(realapply_patchtool)All four ended with the full suite green on an independent rerun.
Codex tells unknown models to use a tool they do not get. Without a catalog entry, Codex sends the fallback base instructions. Those instructions mention
apply_patchfive times, in an old{"command":["apply_patch",...]}format, butapply_patchis not among the tools sent. This is where the occasional "unsupported call" came from.-c model_catalog_json=<file>with astrataentry (apply_patch_tool_type = "freeform") fixes the mismatch. v0.1.40 handles the custom tool fine. The results were:But this did not reduce steps. Qwen followed the "how" rules and not the "how much" ones: patches averaged 1.3 hunks. Runs 6 and 7 were 20 to 30 minutes slower than run 5. For this model, the generic fallback plus the work recipes in
AGENTS.mdremains the fastest setup.One parser event. Across 9 long sessions there was a single tag leak: an assistant message ending in
<tool_call> = </think>(run 6), followed immediately by a correct tool call. It was harmless, and it was the only one. I'm noting it because v0.1.43 includes parser fixes, and I will check this once we upgrade.@fioruccione commented on GitHub (Oct 14, 2026):
Follow-up (14 Oct): replacing Codex's base instructions. Interim results, not a recommendation yet.
Setup now: Strata v0.1.43.1, same model and flags as above, Codex CLI 0.162.0, effort
medium.What changed.
model_instructions_filereplaces Codex's fallback base instructions with a short text (~280 words, written by GPT-6.1 for this model). It says:apply_patchworks through the shell, not as a separate tool;Test 1 (13 Oct): restart from a mid-task snapshot of the same task. The snapshot already passed 12 of the 13 checks. So "12/13" below means no regressions, not new fixes. Three runs per variant, medians (range):
Usage errors over the three runs: A had 9 failed patches and 3 calls to tools it does not have; B had 0 and 0.
Test 2 (running): the full task from the base commit, the same task as the table above. The first B run took 159 min and 299 requests, passed 12/13, and left the suite green. That is about twice run 5 above. The last part of the run was a long self-review after the fixes: hand-written check scripts and additions to the report. Five more runs are pending, B and B plus a test runner that remembers results per code fingerprint.
So far: on a short restart, B halved the requests; on the full task, one run says it does not. I will post the numbers when the runs are done.
@fioruccione commented on GitHub (Oct 15, 2026):
Follow-up (15 Oct): full-task results. Codex base instructions vs short base instructions. All runs on Strata v0.1.43.1.
First, a correction to my 14 Oct comment. I described the end of the first B run as "a long self-review after the fixes: hand-written check scripts and additions to the report". The measured part holds: in its last 43 minutes the run changed no code and no tests (we record file hashes at every model request). What it did in that time comes from a heuristic classification of its commands. Most of them (44) were classified as temporary scripts or ad-hoc checks, and only 2 as report edits, so "additions to the report" was wrong. Those checks also missed the one requirement the run left open.
Setup. This is the same task as run 5 above: same base commit and the same external verifier with 13 checks. Each run was followed by an isolated rerun of the project suite. Common to all runs: Codex CLI 0.162.0, effort
medium, samedeveloper_instructionsandAGENTS.md.Every 12/13 misses the same check, a symlinked export target.
What I take from it
Completion: A finished 2 of 3 runs, B and F finished 3 of 3. The 48 minutes of A2 are the cost of an interrupted run, not a faster result.
On the full task, B shows no consistent efficiency advantage over Codex's base instructions.
I have gone back to Codex's base instructions for daily use and kept B as an alternative.
In these runs, generation volume was the main observed contributor to wall time. We did not observe a substantial decode slowdown on the sampled long, cached prompts.
The context fills up in every run.
context_length_exceeded, and Codex ended the session instead of compacting.model_auto_compact_token_limit=200000helped in the one run that exercised it (S1).It is one run, and the setting does not guarantee a fixed reserve: how much room is left depends on the tool output and the response that follow.
The caching test runner never served a cached result. 6 of its 8 runs used its force flag, which bypasses the cache, and the other 2 were first runs on that code, so the cache never had a chance to answer.
One premature-termination observation. The second threshold run (S2) ended at minute 17, with exit 0, with no code changed and only 161k of context, so the threshold played no part. The last response (no. 49) had
status: completedand contained a singlereasoningitem, with no message and no actual tool call. The reasoning text ends with a tool call in a different syntax:Codex then ended the turn. It happened once in 12 long sessions. I have not yet worked out which component should handle this case, and I have not checked it on v0.1.44.1. I'm reporting it in case you have seen it elsewhere.
We moved to v0.1.44.1 today. A short check passed (startup, tool calls, a small edit plus a test), but none of the numbers above come from it.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.