Skip to content

Bound the two unbounded channels inside the engine #6147

Description

@Hmbown

From the 0.9.14 refactor backlog.

core/engine.rs ~1508 tx_subagent_completion and ~6965 progress_tx are mpsc::unbounded_channel. A pathological tool emitting progress in a tight loop grows memory without bound inside the one actor the whole product depends on. ~33 other unbounded sites exist outside the engine.

Fix per channel semantics: progress is telemetry — try_send with drop-oldest (or a capped VecDeque the engine already owns). Sub-agent completions must not be lost — bounded channel with backpressure to the sender, or fold into the existing active state under the tokio Mutex.

Size: S, high value per line.

Activity

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

    rustPull requests that update rust codesubagentsSub-agent orchestration, lifecycle, and completion handling

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions