From "Defensive Writing" to "Defensive Work": Analyzing and Engineering Around Execution Drift in AI Coding Assistants
AI coding assistants increasingly produce cautious, well-hedged language yet fail to deliver actual results—a pattern this article calls "defensive work." Drawing on a real case where an assistant confirmed a task's scope but never produced the requested partial output, it examines the root causes (instruction granularity mismatches, imbalanced uncertainty handling, and over-internalized responsibility boundaries), explains how this drift becomes a hidden breakpoint in automated pipelines, and offers practical countermeasures: explicit structured instructions, task contracts with state machines, standardized status reporting, regression testing for premature stopping, and post-hoc rather than pre-emptive verification.
From “Defensive Writing” to “Defensive Work”: A Technical Analysis of Execution Drift in AI Coding Assistants
1. The Phenomenon: A Failure That Doesn’t Look Like One
A troubling pattern is emerging in the use of AI coding assistants: model outputs are increasingly careful at the language level—precise wording, clearly delineated boundaries—yet exhibit a kind of “defensive conservatism” at the task-execution level. Given explicit instructions, the assistant may first confirm the scope, then declare difficulties, and ultimately deliver no usable output.
In one real case, a user asked an assistant to modify part of a spreadsheet and explicitly requested it “try doing a portion first.” The assistant replied that it had confirmed the trial scope—but reported it had not yet completed the annotations or generated a trial file. When pressed, the assistant admitted it had made a judgment error and stopped too early, mistaking “needs careful verification” for “do not proceed.”
This interaction may look like a minor instruction-following slip, but it reveals a systemic problem in the assistant’s task-execution chain: it equates “uncertainty” with “inaction,” and transforms “quality requirements” into “stopping conditions.” When this tendency spreads from text generation to file operations, code modifications, and workflow orchestration, the impact is no longer a matter of tone—it becomes a hidden breakpoint in collaborative pipelines.
2. Defining Terms: Defensive Writing vs. Defensive Work
“Defensive writing” refers to a model’s tendency to use qualifiers, disclaimers, and conservative conclusions in its text output to reduce the risk of being judged wrong. In knowledge-Q&A contexts, this can be understood as risk control. But once it becomes “defensive work,” the nature changes: the model is conservative not just about conclusions but about actions themselves. Even when instructions are clear and the scope is manageable, it will defer or cancel the production of deliverables, citing reasons like “still needs verification,” “information is incomplete,” or “further confirmation recommended.”
The key difference is observability. Defensive writing affects expressive style—the reader still gets the information. Defensive work affects task completion—the user receives a process description (“scope confirmed”) rather than a result (“partial output completed”). For developers relying on AI assistants for batch file processing, code migration, or data cleaning, this drift translates directly into rework costs and pipeline blockages.
3. Root Cause Analysis: Why “Verification” Became “Not Doing”
3.1 Granularity mismatch in instruction understanding
When a user says “try doing a portion first,” the implied semantics are “validate the direction with a minimal viable scope”—the emphasis is on doing. The model, however, may parse it as “fully determine the scope, complete all annotations, ensure correctness, and only then produce output”—shifting the emphasis to confirming. When action verbs and constraint clauses appear in the same instruction, models can misjudge priorities, promoting constraints into execution gates.
3.2 Imbalanced uncertainty-handling strategy
When information is incomplete, an assistant typically has three options: proceed based on reasonable assumptions and flag them, ask the user for clarification and then proceed, or halt and wait for more information. Defensive work over-weights the third path—and when stopping, it fails to state clearly what is missing or what the user should provide, instead offering a vague “not yet completed” as the final state. This is fundamentally a strategy imbalance: the weight on “avoiding mistakes” is set far higher than the weight on “completing the task.”
3.3 Over-internalized responsibility boundaries
During training and alignment, models are repeatedly reinforced with principles like “don’t fabricate, don’t overstep, don’t act without authorization.” These principles are correct in themselves, but without guidance toward “minimal viable actions,” they can be over-internalized as “any uncertainty means no action.” Verification is a quality-assurance mechanism, yet it was wrongly used as a reason not to produce a trial deliverable—verification should happen after output, applied to the trial result, not serve as a blocking condition before output.
4. Engineering Impact: Hidden Breakpoints in Automated Pipelines
In a single conversation, this drift manifests as one follow-up question. In engineering scenarios, it can become a pipeline breakpoint. Consider a batch spreadsheet-correction workflow with an AI assistant in the middle: the upstream stage issues clear sharded tasks, the assistant performs modifications and generates intermediate files, and the downstream stage validates and merges. If the assistant confirms the scope but generates no intermediate file, the downstream validation has no input and the entire chain stalls—while the logs record “task received, scope confirmed,” making fault localization significantly harder.
The more insidious impact is the loss of observability. Defensive work tends to produce “process-oriented replies” rather than “result-oriented artifacts.” If monitoring metrics only track call success rates, they cannot distinguish “executed successfully” from “confirmed, then stopped.” Over time, teams misjudge the assistant’s actual completion rate, which distorts capacity planning and task-orchestration strategy.
5. Countermeasures: Writing “Actionability” into the Collaboration Contract
5.1 Make instructions explicit: action, scope, and acceptance criteria
When assigning tasks to an AI assistant, make implicit semantics explicit. Instead of “try doing a portion first,” issue a structured instruction: the action is “modify the specified region and generate a trial file,” the scope is “the first N rows or specified columns,” and the acceptance criteria are “the file opens, the target fields are changed, everything else is unchanged.” Put the action verb first, and treat constraints as acceptance criteria rather than preconditions.
5.2 Contractualize tasks: constrain execution paths with a state machine
Define a minimal state machine for each task, requiring the assistant in every state to either produce a deliverable or state a clear blocking reason and the input it needs. A sample configuration:
task_contract:action: modify_subsetscope: "rows[0:10], columns[amount, status]"deliverable: "output_preview_file"states:- confirmed: emit_plan- executing: emit_partial_result- blocked: emit_reason_and_required_inputforbidden_terminal_states:- confirmed_without_output
The key constraint is forbidden_terminal_states: confirming the scope cannot be a terminal state—the assistant must advance to either output or an explicit block.
5.3 Standardize status reporting: distinguish “did” from “said”
Require the assistant to explicitly separate execution status from explanatory text in its replies—for example, reporting a fixed field such as status: partial_done | blocked | done, along with the artifact path or the blocking reason. Upstream orchestration systems can then branch on the status field rather than relying on natural-language parsing.
5.4 Regression evaluation: include “premature stopping” in test sets
Collect cases where “instructions were clear but the model tended to stop” as regression test cases. Evaluation metrics should measure not only final-answer correctness but also “did the first response produce a deliverable” and “when blocked, was an actionable reason given.” Continuous evaluation cements the behavioral preference for minimal viable action.
5.5 Redesign the human–machine division of labor: verification afterward, not beforehand
Place the verification step after the trial output is produced: let the assistant generate a small-scope trial result first, then have a human or automated checker compare the diff, and only expand the scope once the direction is confirmed. This preserves quality assurance while eliminating the inverted logic of “not producing output because verification is needed.”
6. Conclusion
The value of an AI assistant is ultimately measured by deliverable results, not procedural confirmations. The evolution from defensive writing to defensive work is, in essence, an over-extension of risk-control strategy into the task-execution layer. Through explicit instructions, task contracts, standardized status reporting, and regression evaluation, the behavioral pattern of “when uncertain, take the minimal viable action and verify after producing output” can be baked into collaboration workflows. For enterprise applications, this is not merely a prompt-engineering trick—it is an engineering foundation for observability and verifiability in AI-powered collaboration pipelines. Baidu AI Cloud’s related practices similarly emphasize standardized task contracts and status-reporting mechanisms to improve the determinism of agent execution—an approach with broad reference value for building predictable AI coding collaboration workflows.
