Back to the ward
Case 0534ModerateConcrete Thinking

A Prompt Template Looks Like an Artifact

Admitted
2026-10-05
Source dataset
BugReAct (When Agents Fail)
Source
GitHub, opsclawd/automation
Failure mode
Destructive action
Agent system
Autonomous loop
Tool access
Write access
Industry
Software development

Presenting Behaviour

During an automated fix run, a mid-run correction step was triggered with the instruction to 'remove orchestrator artifacts that were committed by the agent.' The correction agent identified two files in the repository, prompts/architecture-review/architecture-review.md and prompts/review-fix/spec-review.md, as matching its cleanup criteria and deleted them. Both were legitimate prompt template files that had existed in the repository before the current run and were actively used by the orchestrator itself as prompt templates. Their deletion broke the CI pipeline with ENOENT errors across 16 test assertions.

Case Replay

A reconstruction, not a simulation. This sequence is reconstructed from the public incident record and summarised in our own words. It is a static record of what was reported, and nothing here can be run or replayed live.

4 steps

  1. Correction step. The agent is told to remove orchestrator artifacts.
  2. Pattern matches. Two prompt template files fit its criteria. This is where the agent derailed.
  3. Deletes them. Both were pre-existing, actively used files.
  4. CI breaks. 16 test assertions fail with ENOENT errors.

Differential Diagnosis

A misconfigured artifact-path specification, a contributing factor. The ORCHESTRATOR_ARTIFACT_PATHS configuration that classified these files was wrong. But the configuration being wrong doesn't explain why the agent proceeded with deletion without checking whether the files it was about to remove were pre-existing, tracked repository files versus files the current run had generated.

Disinhibition (acting destructively beyond intended scope), considered. The agent did exceed its intended scope, it deleted pre-existing source files it was not meant to touch. But the mechanism here is a misapplied categorical rule, not a failure of restraint.

Concrete Thinking, most consistent with the evidence: the instruction was 'remove orchestrator artifacts,' and the agent applied it to every file matching the configuration's artifact-path specification, without asking whether those files existed before the run started or checking whether they were load-bearing source files rather than temporary outputs.

Working Diagnosis

Concrete Thinking: the cleanup instruction was applied to all matching files without checking whether each matched file was an ephemeral artifact from the current run or a pre-existing tracked source file, following the literal rule without recognizing the context that should have constrained it.

Discussion

Cleanup operations that delete files based on naming patterns or path configurations are correct when applied to the right files and catastrophic when applied to the wrong ones. The gap between 'matches the pattern' and 'was generated by this run' is exactly what a git-status check would close: a file under version control that predates the current run is not an artifact to clean up, regardless of where it sits in the directory tree. Any cleanup agent should verify against the repository's baseline before deleting tracked files.

Mitigation Strategy

Verify against the repository baseline before deleting tracked files.

Governance Guardrails

Git-status checks before cleanup; protection of tracked source files; pattern-based deletes reviewed.

Typical Presentation in Human Patients

General clinical background, included for context. Not medical advice, and not a diagnosis of any individual.

Concrete thinking is an inability to move beyond the literal, surface meaning of language to grasp metaphor, analogy, or implied intent. It's a classic finding in some psychotic disorders and certain forms of dementia, and is often tested clinically by asking someone to explain the meaning of a common proverb.

Source Note

GitHub, opsclawd/automation

https://github.com/opsclawd/automation/issues/1294