I found a small edge case in app-server output cap handling.
When output length is exactly equal to outputBytesCap, capReached can be reported as true even though no output was actually truncated.
I tested three cases locally:
- below cap ->
capReached = false
- exactly at cap ->
capReached = false
- above cap ->
capReached = true
The narrow fix is to derive capReached from whether the original chunk was actually shortened, rather than whether the observed byte count equals the cap.
I have a small local patch covering both command/exec and process/spawn if maintainers think this matches the intended protocol semantics.
Patch branch:
https://github.com/mturac/codex/tree/audit/cap-reached-exact-cap
Commit:
mturac@956b2a8
I found a small edge case in app-server output cap handling.
When output length is exactly equal to
outputBytesCap,capReachedcan be reported as true even though no output was actually truncated.I tested three cases locally:
capReached = falsecapReached = falsecapReached = trueThe narrow fix is to derive
capReachedfrom whether the original chunk was actually shortened, rather than whether the observed byte count equals the cap.I have a small local patch covering both
command/execandprocess/spawnif maintainers think this matches the intended protocol semantics.Patch branch:
https://github.com/mturac/codex/tree/audit/cap-reached-exact-cap
Commit:
mturac@956b2a8