Skip to content

TUI task list doesn't update when agents create new beads during execution #360

@mwarger

Description

@mwarger

Problem

When an agent working on a bead creates new beads within the same epic (e.g., via br create), those new beads don't appear in the TUI task list until the user manually presses r to refresh.

The engine's execution loop already re-queries the tracker each iteration (via getNextTask() and isComplete()), so new beads are picked up for execution — the problem is purely that the TUI task list doesn't update to show them.

This makes the TUI feel out of sync with reality, especially for workflows where agents dynamically create subtasks.

Expected behavior

After a task completes, the TUI should automatically refresh the task list to show any new beads the agent may have created.

Current behavior

New beads only appear after manually pressing r.

Affected modes

  • Single mode (sequential execution)
  • Parallel mode (worker-based execution)

Proposed solution

Reuse the existing engine.refreshTasks()tasks:refreshed event → setTasks() pipeline that the r key already triggers:

  1. Single mode: Call refreshTasks() after task completion in the engine loop
  2. Parallel mode: Query the tracker after worker:completed and merge:completed events, with a 2s debounce to avoid hammering the tracker when multiple workers finish simultaneously
  3. Bonus: Fix the r key to also work in parallel mode (currently requires engine which doesn't exist in parallel mode)

This approach works with all tracker types (beads, beads-rust, beads-bv, json) since it operates at the BaseTrackerPlugin level via the abstract getTasks() method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions