Skip to content

Task-driven Bot execution: unfinished board tasks wake the owning Bot #1109

Closed

Description

@Birfy

Written-by: Dev

Goal

Make conversation Tasks drive Bot turns: when a Bot has unfinished work on the board, it wakes and executes that work on its own, instead of waiting for another human message.

Owner ask (2026-10-25, after #1099 / #1100): 「让Bot执行任务变成任务驱动,自主执行」.

Today (#1099 / merged #1100)

  • track_tasks records overall + per-Bot subtasks, names the highest-priority unfinished task as Next:, and supports ask / answer when stuck.
  • The prompt tells the Bot to continue that next task when it already has a turn.
  • Idle default (Team prompts: a Bot stays idle until it is addressed or given a task (part B of #645) #699): a Bot does nothing until the user addresses it, it is @-mentioned in a group, or its parent hands it work via message_bot. Unfinished board cards therefore sit until someone chats again.

Expected behavior

  1. Wake on unfinished work — when a Bot owns unfinished conversation tasks that are not waitingFor: input, the host starts a turn for that Bot (own chat, or the group Session that owns the subtask) with a clear continue cue naming the next task id/title/priority. No new user message required.
  2. Auto-advance — after a turn updates progress/column and more unfinished own work remains (still not waiting), the Bot is woken again for the new Next (or finishes the chain in one turn when that is already natural). Done / cancelled / waiting tasks stop the drive.
  3. Stuck stays escalate-once — a task waiting on input must ask the user or the group (existing ask path) and must not keep waking until answer clears it.
  4. Priority — wake order matches track_tasks / compareForWork (urgent → high → normal → low; in-progress before not-started at the same priority).
  5. Idle default preserved for inventing work — Bots still must not invent new jobs or status spam. Unfinished tasks the user or a group already handed them count as "given a task" under Team prompts: a Bot stays idle until it is addressed or given a task (part B of #645) #699; they do not authorize unsolicited new work.
  6. Guards — no wake while that Session already has an open turn; coalesce duplicate wake requests; backoff if a wake made no board progress; do not open unbounded group rounds from the driver alone.

Scope (implementation sketch — agent should verify)

  • Host path that notices unfinished conversation tasks and injects / schedules a continue turn (likely near tasks.js / delivery / follow-through; reuse existing schedule or inbox patterns if one already fits).
  • Prompt: unfinished board work is an allowed wake reason; keep the "do not invent work" rule.
  • track_tasks may expose or persist enough for the host to decide wake vs wait without a model call.
  • Tests: host-level cases for wake, no-wake when waiting, no double-wake mid-turn, stop when done; extend prompt/tool tests if copy changes.
  • Changelog fragment + docs/subsystems/core-host.md if behavior/docs change.

Out of scope

Related

Acceptance

  • A Bot with an unfinished own conversation task (not waiting) receives a continue turn without a new user message.
  • After progress, remaining unfinished work continues (or a follow-up wake) until done or waiting.
  • Waiting tasks ask once and do not wake-loop.
  • Idle default still blocks inventing work and unsolicited status spam.
  • Guards: no mid-turn double wake; backoff / coalesce as above.
  • npm run verify green; docs/changelog as required.

Activity

  1. added
    enhancementNew feature or request
    area:automationScheduled tasks and automation
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 25, 2026
  2. self-assigned this
    on Oct 25, 2026
  3. Birfy commented on Oct 25, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev

    Claiming for implementation.

    Branch: cursor/task-driven-bot-execution-1109

  4. Birfy commented on Oct 25, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev

    Owner clarification (2026-10-25):

    In a group, multiple member Bots may advance their own subtasks in parallel in the same drive window — that is the point of role assignment (overall + per-Bot children). A single Bot still works one Next task at a time.

    Acceptance addendum:

    • After planning (overall + subtasks), waking the Writer subtask must not serialize or block waking the Chief (or other assignees) subtask; each owner Bot can run its continue turn concurrently with the others.
    • Still no mid-turn double-wake for the same Session; still no wake-loop on waiting tasks.
  5. added
    agent-prPull request opened by an agent
    and removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 25, 2026
  6. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-prPull request opened by an agentarea:automationScheduled tasks and automationenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions