Multi-Agent Long-Running Tasks: When to Answer Directly and When to Assemble a Team

    As models converge on single-turn comprehension, the real gap between agent systems appears in how they decide to act: answering directly, calling tools for evidence, or spawning a team of subagents. This article examines two common failure modes—confident answers without evidence and over-orchestration of simple tasks—and presents practical patterns for evidence traceability, task-tiered scheduling, harness-level validation, checkpoint-based recovery, and measurable evaluation of long-running agent workflows.

    1. Background: After Comprehension Converges, the Gap Is in the Harness

    Across the same generation of models, baseline comprehension on single-turn tasks is increasingly similar. On most tasks, models of different sizes can understand the question and produce a reasonably structured answer. In real-world engineering, the gap usually shows up elsewhere: how a model decides when facing a complex task. Does it answer directly, call tools to gather evidence first, or decompose the task and spin up multiple subagents to work in parallel?

    That decision is made by the agent harness. The harness manages tool calls, context assembly, subtask scheduling, and result collection. A model’s behavior inside a harness depends heavily on the constraints and incentives the harness imposes. So when evaluating an agent system, single-turn Q&A quality is not enough—you also need to observe its behavior trajectory across multi-step tasks.

    2. Two Typical Failure Modes

    Agent systems commonly fail on complex tasks in two opposite ways. Both are, at their core, decision calibration problems.

    1. Answering from impressions (conclusions without evidence)

    When a task requires external facts—researching a technical approach, analyzing a codebase’s dependencies—a model may write a well-structured, fluent analysis based purely on patterns in its training data. Such text reads as insightful, but its conclusions have no backing from file contents, retrieval results, or command output. Once specific function names, configuration keys, or version numbers are involved, errors become hard to catch by eye.

    The danger here is misplaced trust. The reader sees “a conclusion that looks researched,” when in fact nobody checked the source material.

    2. Over-orchestration (spinning up a team for simple tasks)

    The opposite failure is launching a large set of subtasks for a trivial question. A question that only requires reading one config file might trigger multiple subagents to search independently and then merge. The result: higher latency, multiplied token consumption, and fragmented context across subagents—leading to lost or duplicated information during the final merge.

    These two failures need separate treatment. The first demands that the system gather evidence whenever evidence is needed; the second demands restraint when collaboration is unnecessary.

    3. Core Principle: Every Conclusion Must Be Traceable

    For tasks that require external evidence, “evidence-based” can be broken down into a checkable evidence chain:

    • Every factual conclusion maps to a source—a file read, a search result, command output, or a database query result.
    • Sources must carry unique identifiers so they can be reviewed and audited.
    • Conclusions without a source can only be labeled as speculation, and must not be mixed with verified facts.

    The way to enforce this is to constrain the output structure. The harness can require the model to return conclusions and their sources in a fixed format, then mechanically validate them before delivery. The benefit: validation logic doesn’t rely on the model’s self-assessment, but on structural completeness.

    4. Task Tiering and Scheduling Decisions

    The scheduling policy should be determined before execution begins. The table below shows a general tiering approach; the exact thresholds should be tuned to your actual task mix and cost budget.

    Task Type Typical Characteristics Recommended Strategy
    Common-sense Q&A No dependence on external state Answer directly
    Single-fact lookup One tool call suffices Call one tool, then answer
    Multi-source research / codebase analysis Requires cross-validation across sources; steps have dependencies Serial evidence gathering, logging each item
    Long-running complex tasks Independent subtasks, long duration, many steps Decompose into subtasks, launch a subagent team

    Here is an illustrative decision function showing how task characteristics map to strategies. The code doesn’t correspond to any specific framework’s interface—it only expresses the decision logic.

    1. from dataclasses import dataclass
    2. from enum import Enum
    3. class Strategy(Enum):
    4. DIRECT = "direct" # Answer directly
    5. SINGLE_TOOL = "single_tool" # One tool call, then answer
    6. SERIAL_EVIDENCE = "serial_evidence" # Gather evidence serially
    7. TEAM = "team" # Decompose and launch subagent team
    8. @dataclass
    9. class TaskProfile:
    10. needs_external_evidence: bool # Whether external evidence is required
    11. estimated_steps: int # Estimated number of steps
    12. parallelizable_subtasks: int # Number of independent parallelizable subtasks
    13. def choose_strategy(profile: TaskProfile) -> Strategy:
    14. if not profile.needs_external_evidence:
    15. return Strategy.DIRECT
    16. if profile.estimated_steps <= 1:
    17. return Strategy.SINGLE_TOOL
    18. if profile.parallelizable_subtasks >= 2 and profile.estimated_steps > 8:
    19. return Strategy.TEAM
    20. return Strategy.SERIAL_EVIDENCE

    Two points are key in this logic. First, whether evidence is needed is the first branch—it determines whether the system enters the evidence-gathering flow at all. Second, team mode requires two conditions simultaneously: at least two independent parallelizable subtasks, and enough total steps. Decomposition is only worth it when the parallelism gains outweigh the coordination cost.

    The estimated step count and parallelizable subtask count usually come from a planning phase. Planning itself can be wrong, so during execution the system should be allowed to revise its strategy based on runtime feedback—for example, if a subtask’s actual step count far exceeds the estimate, escalate it into an independent task.

    5. Enforcing Evidence-Gathering at the Harness Level

    Relying on prompts alone to make a model “must verify” is usually unstable. A more reliable approach is structured validation at the harness level.

    The validation logic checks two things: whether the task is marked as requiring evidence, and whether every claim in the answer carries a valid source. If validation fails, the harness feeds the errors back to the model and requires it to gather the missing evidence and answer again.

    1. def validate_answer(answer: dict, profile: TaskProfile) -> list[str]:
    2. errors: list[str] = []
    3. if profile.needs_external_evidence and not answer.get("evidence"):
    4. errors.append("Task requiring external evidence is missing the evidence field")
    5. for claim in answer.get("claims", []):
    6. if not claim.get("source_id"):
    7. text = claim.get("text", "")[:30]
    8. errors.append(f"Claim missing a source: {text}")
    9. return errors

    The value of this validation is reproducibility. The same answer produces the same check results regardless of which model generated it. It’s also easy to measure: the validation failure rate directly reflects how stable the model’s evidence-gathering behavior is.

    Note that validation only guarantees structural completeness—it cannot guarantee that the source content actually supports the conclusion. Semantic verification of sources can be delegated to a dedicated review step, such as a separate checker role that compares each claim against the original snippet. This adds cost, so it’s suitable for high-risk conclusions rather than for every sentence.

    6. Subagent Collaboration and Failure Prevention in Long-Running Tasks

    The main risks in long-running tasks include rerunning everything after a mid-task failure, subtask results overwriting each other, context bloat losing critical information, and getting stuck in unproductive loops. The following mechanisms address each of these.

    1. A clear task board with clear ownership

    Every subtask should have a unique identifier, explicit inputs, acceptance criteria, and a responsible execution unit. The aggregator role should only read subtask results that are complete and have passed acceptance—not the full conversation logs of subagents.

    2. Structured handoffs, not raw log forwarding

    Subagents should return structured summaries to upstream, including conclusions, evidence sources, unresolved issues, and confidence notes. Raw conversation logs are long; stuffing them wholesale into context crowds out other subtasks and introduces irrelevant noise.

    3. Checkpoints and resumable execution

    Persist state after each subtask completes. After an interruption, the system reads the checkpoint and skips completed work. The example below illustrates this approach; run_subagent is a placeholder for the execution function the caller must provide, not any specific interface.

    1. import json
    2. import os
    3. def load_state(path: str) -> dict:
    4. if not os.path.exists(path):
    5. return {"done": {}}
    6. with open(path, "r", encoding="utf-8") as f:
    7. return json.load(f)
    8. def save_state(path: str, state: dict) -> None:
    9. tmp_path = path + ".tmp"
    10. with open(tmp_path, "w", encoding="utf-8") as f:
    11. json.dump(state, f, ensure_ascii=False)
    12. os.replace(tmp_path, path) # Atomic replace, prevents file corruption on interrupted writes
    13. def run_long_task(subtasks: list[dict], state_path: str, run_subagent) -> dict:
    14. state = load_state(state_path)
    15. for sub in subtasks:
    16. if sub["id"] in state["done"]:
    17. continue
    18. result = run_subagent(sub)
    19. state["done"][sub["id"]] = result
    20. save_state(state_path, state)
    21. return state

    Writing to a temporary file first and then atomically replacing it is a common technique to avoid corrupting checkpoints. If power is lost mid-write, the old checkpoint remains intact.

    4. Budgets and stop conditions

    Every task should have limits on tokens, tool call counts, and wall-clock time. You also need a “no progress” criterion—for example, stopping when several consecutive rounds produce no new evidence or no change in subtask state, then reporting current progress to the user rather than continuing to burn resources.

    5. Idempotent tool calls

    In long-running tasks, the same tool call may execute multiple times due to retries. For write operations, check the target state before calling, or generate a unique key per call so repeated executions don’t produce duplicate side effects. Read-only queries are naturally idempotent, but their results should still be recorded to avoid repeated quota consumption.

    7. Evaluation Methods

    Judging whether an agent system is up to standard requires quantifiable metrics. The following categories are a good starting point:

    • Evidence coverage rate: the proportion of factual conclusions that carry a valid source.
    • Over-orchestration rate: the proportion of tasks that spawned a subagent team when they could have been completed directly.
    • Call efficiency: average tool calls and token consumption per task of the same type.
    • Long-running success rate: the proportion of long-running tasks completed without human intervention, and the proportion recoverable from checkpoints after mid-task failures.
    • Conclusion consistency: whether key conclusions remain stable across multiple runs of the same task.

    Evaluation requires an annotated task set covering all four categories: common-sense Q&A, single-fact lookup, multi-source research, and long-running tasks. Different harness configurations can be compared on the same task set to observe metric changes. Specific metric values should come from your own testing—don’t rely on borrowed rule-of-thumb numbers.

    8. Practical Recommendations

    1. Tier your tasks first, then decide the scheduling strategy. A system without tiering easily oscillates between the two failure modes.
    2. Encode evidence requirements into the output structure and validate programmatically—don’t rely on prompts alone.
    3. Use team mode only for long-running tasks with clear parallelism gains, and set budgets and stop conditions for them.
    4. Pass structured summaries between subagents to keep context size under control.
    5. Long-running tasks must support checkpoints and resumable execution, and write operations must be idempotent.
    6. Maintain a fixed evaluation task set and rerun it after every harness configuration change; let the data decide whether to ship.

    An agent system’s reliability ultimately depends on whether the harness can make the model choose the right action at the right time. Knowing when to answer directly, when to assemble a team, and how to keep results traceable throughout long-running execution—these are the main challenges in current engineering practice.