Skip to content

PCSandbox doesn't plumb max_output_bytes (parity with command_timeout) #1035

Closed

Description

@AmitoVrito

Follow-up from the #1028 review.

#1028 added SandboxConfig.max_output_bytes and threads it through SandboxEnvironment → backend.run_process, so the output cap is enforced everywhere. But the high-level PCSandbox front door does not expose it:

  • PCSandbox.__init__ accepts command_timeout but not max_output_bytes, so a PCSandbox always builds a SandboxConfig with the 1 MB default.
  • PCSandbox.attach() serializes max_output_bytes to metadata.json (pc.py ~L289) but does not read it back on reconstruction (pc.py ~L322), so a round-tripped custom value would silently reset.

Harmless today (not settable via PCSandbox), but it breaks parity with command_timeout and a future custom value would be lost on attach. Add a max_output_bytes param to PCSandbox.__init__ and restore it in attach().

Activity

  1. added
    bug
    on Sep 9, 2026
  2. added a commit that references this issue on Sep 12, 2026
    30e2b9b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions