Balancing Generality and Controllability in AI Agents

    This article examines the structural tension between generality and controllability in AI agents, explaining why more general agents tend to be less stable through action-space freedom, chained error amplification, and goal drift. It presents a four-layer framework for adjustable controllability—observability, checkpoints, subtask contracts, and low-cost human takeover—and offers four criteria for deciding how much autonomy a task should be given.

    1. It Started with a Real Confusion

    A developer who had just finished installing and configuring an AI coding tool kept running into the same question: if you can give instructions in natural language, why does a human still need to step in repeatedly? Another user’s answer pointed to the key difference. In most scenarios, one clear instruction is enough to finish the task. But in execution chains with more complex structure, a human can often notice that a subtask has drifted off target, and one lightweight intervention is enough to bring the whole task back on track. Under a fully managed mode, however, the deviation of a single subtask tends to be amplified level by level and eventually contaminates the overall result.

    The value of this exchange is not in comparing which mode is better. It exposes a widely underestimated engineering problem: there is a structural tension between generality and controllability. To be general, a system must tolerate uncertainty in its execution path. To be stable, it must pay a price—either break the task into smaller pieces and hand the system only the low-complexity parts, or give up the freedom of walking away and keep human supervision.

    2. Why More General Means Less Stable

    2.1 The Conflict Between Freedom and Convergence

    A general-purpose agent is general precisely because it has a large action space at every step: it can read files, search, call tools, and rewrite plans. The larger the choice space, the more dispersed the probability distribution of reaching the goal, and the higher the variance of a single run. This is a necessity in the information-theoretic sense, not an implementation defect.

    2.2 Chained Error Amplification

    A multi-step task can usually be abstracted as a state transition:

    1. s0 --a1--> s1 --a2--> s2 --a3--> ... --an--> goal

    If the per-step accuracy is p, and errors do not self-correct under an idealized assumption, the probability that all n steps are correct is roughly p^n. When p=0.95 and n=20, the overall success rate is already below 40%. The more realistic problem is that an agent’s mistakes are often not “failing in place” but changing the input premises of subsequent steps, so the error is treated as an established fact and reasoning continues on top of it.

    2.3 Goal Drift and Context Dilution

    As the context grows longer, the original goal constraint is diluted in the attention distribution, and the agent easily slides toward local goals that “look like progress”—for example, repeatedly refactoring code that already works, or over-expanding the scope of requirements. The danger of this drift is that every step is reasonable, yet the whole is absurd.

    3. The Cost of Two Extreme Modes

    Mode Advantages Costs Suitable Scenarios
    Fully managed Low human effort, parallelizable, remotely triggerable Errors cannot be intercepted, high rework cost Low-risk, verifiable, rollback-friendly tasks
    Constant supervision Deviations corrected immediately, controllable results High human cost, hard to scale High-value, strongly constrained, one-off deliverables

    A truly mature solution does not choose one of the two, but turns controllability into an adjustable parameter, so that different tasks land at different positions on the spectrum.

    4. A Four-Layer Framework for Adjustable Controllability

    Layer 1: Observability—See It First, Then Intervene

    Human intervention works only if a person can “tell that a subtask has gone off track.” This requires the execution process to produce structured output, not just a final answer. At minimum, record three kinds of information:

    • Intent layer: the goal and acceptance criteria of the current subtask;
    • Action layer: which tools were called, what was read or written, and the scope of changes;
    • Deviation layer: conflict points with the original constraints and uncovered boundary conditions.

    On Baidu AI Cloud, this kind of information can be implemented as a combination of structured logging services and monitoring alerts: report key nodes as metrics, and set alerts for “sudden spike in retries,” “number of changed files above a threshold,” and “consecutive failures.” Then a person does not have to watch the screen the whole time and is only paged when something is abnormal.

    Layer 2: Checkpoints—Cut Long Tasks into Short, Rollback-able Chains

    Break the task into stages with acceptance criteria, and persist the artifacts and decision rationale at the end of each stage. In engineering terms, this can be done with a “task list + stage artifacts” approach:

    1. task: data pipeline overhaul
    2. checkpoints:
    3. - id: schema
    4. acceptance: field and type definitions pass review
    5. artifact: schema.json
    6. - id: transform
    7. acceptance: 100 sampled records match exactly
    8. artifact: etl_v1/
    9. - id: rollout
    10. acceptance: no anomalies in canary environment metrics
    11. artifact: deploy_plan.md

    The point of checkpoints is to downgrade “overall failure” to “redo a single stage,” while giving humans a low-cost place to step in.

    Layer 3: Subtask Boundaries—Constrain Freedom with Contracts

    Give each subtask a clear input, output, prohibitions, and budget (steps, tool calls, time). The clearer the boundary, the smaller the loss of generality and the greater the stability gain. A simplified contract example:

    1. {
    2. "subtask": "refactor the auth module",
    3. "input": ["auth/"],
    4. "output": ["auth/"],
    5. "forbidden": ["modify shared config files", "upgrade dependencies by a major version"],
    6. "budget": {"steps": 15, "tool_calls": 20}
    7. }

    The key design principle is least privilege + single responsibility: a subtask should not have the power to modify its own acceptance criteria, nor should it reach out and change unrelated modules.

    Layer 4: Human Intervention—Design a “Low-Cost Takeover”

    Intervention should not mean starting over. Practical options include injecting a corrective instruction, rolling back to the most recent checkpoint, narrowing the task scope and rerunning, or directly taking over the last step. To keep the takeover cost manageable, ensure that:

    1. State is serializable, so it can be paused and resumed at any time;
    2. Artifacts are versioned, so rollback produces no side effects;
    3. The intervention action itself is recorded, making it easier to review gaps in the rules.

    5. Deciding Where a Task Belongs on the Spectrum

    Use four dimensions to grade a task quickly:

    • Reversibility: can a mistake be undone;
    • Verifiability: can the result be checked automatically;
    • Blast radius: does the change touch production or shared resources;
    • Context length: does the required reasoning chain exceed roughly a dozen steps.

    When all four are low-risk, you can adopt high autonomy, asynchronous triggering, and batch parallelism. If either “blast radius” or “reversibility” is high-risk, checkpoints and human confirmation should be mandatory. For scenarios that need to be advanced remotely or in fragmented time, message queues and container platforms can carry asynchronous execution and result callbacks, with the person responding only at key nodes.

    6. Conclusion

    General-purpose agents and human supervision are not opposites, but feedback loops within the same control system. Accepting instability as an inherent property of generality, using observability to make drift visible, checkpoints to localize failure, contracts to keep subtasks within bounds, and low-cost takeover to bring humans in only when necessary—this is how “having to watch it yourself” is upgraded from a reluctant choice into an engineering capability that is designable, measurable, and scalable.