Skip to content

runner.rs: _early_status_forwarder JoinHandle silently dropped in TUI init path #4571

@bug-ops

Description

@bug-ops

Description

In src/runner.rs:957, a tokio::spawn task is created for the TUI early status forwarder, but the returned JoinHandle is immediately dropped via let _early_status_forwarder = .... While the comment documents intent ("dropping intentional — no cleanup needed on bootstrap error path"), this diverges from the project rule in rust-code.md that fire-and-forget tasks MUST be tracked.

The current comment explains the semantics correctly but does not satisfy the rule, which requires either storing the handle in a tracked Vec<JoinHandle> or documenting an explicit exemption.

Reproduction Steps

  1. Open src/runner.rs at line ~957
  2. Observe: let _early_status_forwarder = tokio::spawn(crate::tui_bridge::forward_status_to_tui(...))
  3. Handle is bound with _ prefix and immediately dropped — not stored in any supervision list

Expected Behavior

Fire-and-forget spawned tasks should either:

  • Be stored in a tracked Vec<JoinHandle> (or equivalent supervisor), or
  • Have an explicit // EXEMPT: <reason> annotation approved as an architectural exception

Actual Behavior

Handle is silently dropped. Although the task is semantically self-terminating (channel close kills it), this pattern is inconsistent with the project's JoinHandle tracking rule and sets a precedent for untracked spawns.

Environment

  • Location: src/runner.rs:957
  • Feature gate: #[cfg(feature = "tui")]
  • Blast radius: bootstrap-only; short-lived; no shutdown semantic impact

Logs / Evidence

let _early_status_forwarder = tokio::spawn(crate::tui_bridge::forward_status_to_tui(
    status_rx,
    early.agent_tx.clone(),
));

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexityenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions