Skip to content

CodeBox.run() includes seccomp ANSI warnings in returned stdout string #237

@yingjunwu

Description

@yingjunwu

Description

CodeBox.run() returns a string that includes ANSI-colored seccomp warning messages from the container runtime, mixed in with the actual program output.

Reproduction

import asyncio
import boxlite

async def main():
    async with boxlite.CodeBox() as codebox:
        result = await codebox.run("print('hello')")
        print(repr(result))

asyncio.run(main())

Expected

'hello\n'

Actual

'hello\n\x1b[2m2026-02-12T02:16:34.805467Z\x1b[0m \x1b[33m WARN\x1b[0m \x1b[2mlibcontainer::process::init::process\x1b[0m\x1b[2m:\x1b[0m seccomp not available, unable to set seccomp privileges!\n'

Environment

  • boxlite 0.5.10
  • macOS Apple Silicon (Hypervisor.framework, no seccomp)

Impact

Any code that parses run() output will break because of the injected warning. This is especially problematic for AI agent use cases where the LLM needs to interpret clean output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions