Skip to content

feat(platform): expose complete task state to project agents #3955

Closed

Description

@yannickmonney

The recurring fleet manager must reconcile every task and decide whether a run has actually finished before resuming routine work. At PR #3942 head 942c16648ed0420b96dfcf7bc6a0ff6c68f1465d, task_find reads at most 200 database rows and exposes no continuation; task_get does not expose the current/latest project-agent run state and its recent comments have no continuation. Filtering cannot enumerate more than 200 tasks in the same bucket.

Provide a focused extension of the existing read tools, reusing existing scoped task/run readers:

  • Bounded, opaque cursor pagination with explicit end/continuation semantics, stable ordering and scope/filter binding. Preserve compatibility and confined-project behavior; do not call the capped count a complete total.
  • Bounded current/latest project-agent and workflow run IDs/status, plus pending human-review/ask indicators sufficient to distinguish running, terminal and human-required work. No hidden transcript, secrets or foreign-project details.
  • Stable comment IDs and continuation so a manager can find a question or its own durable pass receipt beyond the recent window. Include usable IDs for blockers/subtasks.
  • A documented terminal routine-question protocol using existing agent-authored task_comment and task_start_agent(feedback): project agents post a routine question and finish; manager answers and restarts only after confirming the prior run is terminal. Human approvals and native ask_human stay human-only; ordinary agent mentions remain inert. Live steering and agent approval are out of scope.

Prove locally with 251+ same-bucket tasks, tied ordering, normal and malformed/scope-mismatched cursors, explicit concurrent-change semantics, continuation beyond 50 comments, live/terminal/refused read controls and no expanded visibility. Manager pass continuation may be saved as a structured receipt on its standing task; document and test resumption instead of relying on model memory. Keep failed reads visibly unavailable.

This is an activation prerequisite for TALE-357 and a separate read-tools PR. Coordinate with #3942; do not modify its delegated admission, retry budget, vendor cursor store or migrations 0139/0140. All tests stay local with synthetic data. Preserve protected review completion and permissions.

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