Skip to content

app-server capReached reports true when output exactly equals outputBytesCap #22379

@mturac

Description

@mturac

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app-serverIssues involving app server protocol or interfacesbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions