Skip to content

quota: explicit Todo selection can reject the canonical runnable successor #4327

Description

@huangruiteng

Problem

A material quota monitor-poll can create a claimed advancement_task successor that is visible as runnable in the canonical Todo list and selected by ordinary quota should-run, while explicit same-Turn selection rejects the exact same Todo with heartbeat_receipt_identity_conflict.

Minimal observed contract

  • The monitor transition returned a typed successor receipt for a new claimed advancement Todo.
  • loopx todo list --todo-id <id> reported the Todo open and included it in agent_todos.executable_backlog_items.
  • loopx quota should-run without --todo-id selected that exact Todo from capability_gate.runnable_candidates with no missing capabilities.
  • loopx quota should-run --todo-id <same-id> --turn-instance-id <fresh-id> rejected it as not currently projected agent-scoped/capability-ready.
  • Raising --limit did not change the rejection.

Likely seam

Default selection can consume the capability-gate/planning projection, but build_explicit_advancement_next_action qualifies against select_quota_todo_source_items. Those projections can diverge after a monitor-created successor, so the explicit action guard fails closed even though the canonical runnable projection selects the Todo.

Expected behavior

Explicit selection must qualify from the same canonical authoritative Todo inventory as default selection, or return a typed projection-staleness reason plus a deterministic refresh/retry path. A failed receipt must not leave a newly created runnable successor impossible to settle.

Acceptance

  1. Add a regression: material monitor poll creates a successor beyond compact display lanes; default and explicit selection agree on the exact Todo.
  2. Preserve claim, required-capability, Goal/Agent and continuation boundaries.
  3. Retry after a typed failed receipt is deterministic and idempotent.
  4. CLI/managed Turn use the same selection source and return a path-free typed receipt.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions