Skip to content

log: sandbox fd-2 (stderr) output never reaches the host /log namespace #138

Description

@Meirtz

The worker bridges stdlib logging records to the host /log namespace (WorkerLogHandler on the root logger), and pipes only fd 1 (stdout). Anything written to raw fd 2 — a tool subprocess crashing with a traceback, C-extension writes, direct sys.stderr prints — never reaches a host /log consumer; it lands only in the container/provider stderr, which the rollout driver typically doesn't see.

For the agent-eval / RL-rollout use case this is the output you most want when a run fails.

PR #122's branch had a reference implementation (dup2 fd 2 into a capture pipe, drain alongside stdout — worker/process.py on abridge/gateway-tito), but as part of a rewrite that replaced the structured record bridge with a best-effort line stream (no acks/replay), which is why it wasn't ported (see the #122 split summary).

Follow-up here is additive: capture fd 2 alongside the existing structured bridge — e.g. ship captured lines as records under a dedicated logger (agentix.sandbox.stderr) through the same ReliableStream, keeping ack/replay semantics.

Related: #122. Companion issue: durable in-sandbox log artifact.

🤖 Generated with Claude Code

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