Skip to content

[P1.9] Enforce SubprocessAdapter timeout while the external agent is producing output #736

Description

@frankbria

Severity: high | Category: correctness | Phase: P1.9

Problem

run() streams for line in process.stdout: (unbounded) before process.wait(timeout=...), so the 30-min timeout only bounds the window after stdout EOF. A hung external agent (claude/codex/opencode) that keeps stdout open blocks the run — and the batch worker — forever.

Evidence

codeframe/core/adapters/subprocess_adapter.py:124

Acceptance criteria

  • A deadline wraps the read loop (reader thread + overall timer); on expiry the child is killed and a timeout failure returned.
  • Test: a child that stalls with stdout open is terminated at the timeout.

Dependencies

None


Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-high-betaHigh priority - should fix before beta for best experiencepriority:hightype:bugSomething is broken and needs fixing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions