The Research Report
Proof of Work Enums: Forcing Agents to Reason Before They Act
You write a careful system prompt. Twenty lines of instructions telling the agent what to verify before it takes an action. The agent acknowledges them, then ignores every single one three tool calls later.
This is the central problem of agentic reliability. System prompts decay with distance. By turn 15 in a tool chain, your careful prerequisites are noise. The agent is focused on the task, not the rules you set at the start.
A pattern circulating on r/aiagents offers a structural fix. Instead of writing longer system prompts, you add a required enum parameter to your tool schema. The agent cannot call the tool without selecting from a constrained set of values. Each value encodes a reasoning checkpoint.
The pattern is called "Proof of Work" enums. It works. Here is why, how, and where it breaks down.
The Pattern in Practice
The core idea is simple. You have a tool that should only be called after certain conditions are met. Instead of telling the agent about those conditions in a system prompt, you bake them into the tool's parameter schema.
{
"type": "object",
"properties": {
"verification_status": {
"type": "string",
"enum": [
"VERIFIED_SAFE_TO_PROCEED",
"NOT_VERIFIED_UNSAFE_TO_PROCEED"
]
}
},
"required": ["verification_status"]
}
The tool cannot be called without selecting one of these two values. There is no bypass. The JSON Schema constraint is enforced by the model's structured output system.
The original Reddit post by u/OnlyInternal7266 (posted on r/aiagents) explains the mechanism:
"The enum is part of the tool schema, so it's part of what the assistant considers when deciding its next action. Attention shifts to possible tools for the upcoming task, part of that attention requires param inspection. Now the enums are front and center, a key part of the agent's next step."
The key insight is not about verification. It is about attention. The enum values appear in the tool schema at the exact moment the agent decides what to do next. System prompt instructions written 30 turns ago are buried. The enum is right there, unavoidable, in the decision loop.
Why It Works: Attention Mechanics
Large language models are attention machines. Everything they do is shaped by what they attend to. System prompts are part of the context window, but their influence decays as more tokens pile on top of them. This is not a flaw. It is a mathematical property of how attention works in transformer architectures.
Tool schemas are different. When an agent enters its tool-selection phase, it inspects available tools and their parameters. The enum values in the schema are read at decision time. They are not buried under 30 turns of conversation. They are front and center.
The Reddit post identifies a second mechanism: the framing of the enum values matters.
"One means success. One means failure as an assistant, not just the task. This part is crucial. We want the assistant to make this personal so we can capitalize on its desire to please and do a good job."
This leverages the model's training. Frontier models are trained to be helpful and thorough. By framing one enum value as the "good assistant" choice and the other as the "bad assistant" choice, you align the structural constraint with the model's learned preferences. The agent wants to select VERIFIEDSAFETO_PROCEED. To honestly select it, the agent must have actually done the verification work.
The result is a kind of self-enforcing reasoning checkpoint. No external validation system needed. No multi-agent verification pipeline. Just a required field in a JSON Schema.
Why System Prompts Fail
System prompts fail for predictable, well-documented reasons.
Attention decay. Research on prompt sensitivity (arXiv:2604.18389, under review at ICLR 2026) shows that LLMs disperse meaning-preserving inputs rather than clustering them. The longer your context window, the more dilution your instructions experience. A prerequisite check written at turn 0 is background noise at turn 30.
Instruction complexity cliffs. Tian Pan's research on compliance thresholds shows that models follow short, clear instructions well but compliance degrades steeply as instructions pile up. The more rules you add to a system prompt, the less any single rule matters.
Cognitive load ceilings. Research on cognitive load in prompts (arXiv:2604.18897) found a hard accuracy ceiling of 60-79% regardless of prompt sophistication. Complex rule systems collapse weaker models entirely. Llama 3.3 70B hits 0% TRUE recall above 2KB prompts.
The Proof of Work enum sidesteps all three problems. It does not compete for attention in a long context window. It does not add to instruction complexity. It does not increase cognitive load. It is one field, in one tool schema, read at the exact moment the decision is made.
The Poka-Yoke Connection
The Proof of Work enum is a specific instance of a broader pattern called Poka-Yoke for agent tools, documented on AgentPatterns.ai. Poka-Yoke is a Japanese manufacturing term meaning "mistake-proofing." It originated in Toyota's production system: redesign the process so the defective outcome is structurally impossible.
Applied to agent tools, Poka-Yoke means redesigning tool interfaces so the wrong call cannot compile. The AgentPatterns.ai pattern catalog lists several examples:
- Absolute paths over relative paths. Anthropic's SWE-bench Sonnet team found that relative file paths failed after directory changes. Making absolute paths mandatory eliminated the failure mode entirely.
- Uniqueness constraints on edits. String replacement tools that require unique matches force the agent to add specificity rather than make ambiguous edits.
- Read-before-write gates. Claude Code's Edit and Write tools reject calls if the file has not been read in the current session. This is a structural prerequisite, not just an instruction.
- Enum constraints. Using bounded string values instead of free-text parameters. If a status must be one of four states, define those four states in the schema rather than hoping the agent picks the right string.
The Proof of Work enum extends this logic from input validation to reasoning enforcement. Traditional Poka-Yoke prevents wrong values. The Proof of Work enum prevents wrong reasoning.
Anthropic's engineering team explicitly endorses this approach. Their "Building Effective Agents" guide states: "Change the arguments so that it is harder to make mistakes." The SWE-bench Sonnet team reports spending more time optimizing tool interfaces than the overall prompt.
Implementation Patterns
The basic pattern is straightforward. Here are several concrete implementations.
Verification Gate
The canonical example from the Reddit post. A destructive tool requires verification before execution.
{
"name": "deploy_to_production",
"parameters": {
"type": "object",
"properties": {
"verification_status": {
"type": "string",
"enum": [
"VERIFIED_SAFE_TO_PROCEED",
"NOT_VERIFIED_UNSAFE_TO_PROCEED"
],
"description": "Confirm all prerequisites are met before deployment."
}
},
"required": ["verification_status"]
}
}
If the agent selects NOTVERIFIEDUNSAFETOPROCEED, the tool short-circuits with a message: "Verify prerequisites before continuing." Hard stop.
Multi-Step Completion Tracking
For sequential workflows, encode each step as an enum value. The agent must acknowledge which step it is completing.
{
"name": "update_customer_record",
"parameters": {
"type": "object",
"properties": {
"step_completed": {
"type": "string",
"enum": [
"FETCHED_EXISTING_RECORD",
"VALIDATED_NEW_DATA",
"CONFIRMED_USER_CONSENT"
],
"description": "Which prerequisite step has been completed before this update."
},
"customer_id": { "type": "string" },
"updates": { "type": "object" }
},
"required": ["step_completed", "customer_id", "updates"]
}
}
This forces the agent to reason about what it has already done before it can act.
Confidence Level
For decisions with risk, force the agent to declare its confidence.
{
"name": "execute_trade",
"parameters": {
"type": "object",
"properties": {
"confidence_level": {
"type": "string",
"enum": [
"HIGH_CONFIDENCE_BASED_ON_VERIFIED_DATA",
"MEDIUM_CONFIDENCE_SOME_ASSUMPTIONS_MADE",
"LOW_CONFIDENCE_INSUFFICIENT_INFORMATION"
]
},
"trade_details": { "type": "object" }
},
"required": ["confidence_level", "trade_details"]
}
}
Your application logic can then route based on the confidence value. High confidence trades execute immediately. Low confidence trades go to a review queue.
Safety Classification
For content moderation or safety-critical operations, force explicit classification.
{
"name": "publish_content",
"parameters": {
"type": "object",
"properties": {
"safety_review": {
"type": "string",
"enum": [
"REVIEWED_NO_HARMFUL_CONTENT_FOUND",
"FLAGGED_POTENTIALLY_HARMFUL_CONTENT"
]
},
"content": { "type": "string" }
},
"required": ["safety_review", "content"]
}
}
The agent cannot publish without making a safety determination. The classification becomes an auditable log entry.
The Deterministic Compliance Claim
The Reddit post makes a strong claim:
"With models >= Sonnet 4.5 and GPT 5-1, zero evidence [of hallucination]. Models hallucinate when you leave room for interpretation — they fill in the blanks. Models may make assumptions, but that's always based on a gap in context, not fabrication. With complete context there are no blanks to fill."
"For the model to get this wrong it would have to lie. And without encouragement to do so, today's frontier models simply don't lie."
This claim needs nuance. The pattern is not immune to failure modes. It is dramatically more reliable than system prompt instructions for the same enforcement goal. Here is what the evidence actually supports.
What works. Structured output constraints (JSON Schema, enum values) are enforced by the model's output generation system. When OpenAI's Structured Outputs or Anthropic's strict mode are enabled, the model physically cannot produce a value outside the enum. Tian Pan's production analysis (referenced in our earlier article on the Instruction Complexity Cliff) found that structural constraints in tool schemas achieve near-deterministic compliance where equivalent system prompt instructions fail at scale.
What remains risky. The enum forces the agent to select a value. It does not force the agent to actually perform the verification. An agent can select VERIFIEDSAFETO_PROCEED without having verified anything. The structural constraint guarantees that the agent acknowledged the choice. It does not guarantee that the agent's internal reasoning matches the selection.
The distinction matters. The pattern catches the class of errors where the agent skips a step entirely because it forgot or the instruction was too far back in context. It does not catch the class of errors where the agent believes it has verified something but has not done so correctly.
Relationship to Other Patterns
The Proof of Work enum sits at the intersection of several existing patterns.
Poka-Yoke for agent tools. The AgentPatterns.ai catalog formalizes mistake-proofing for tool interfaces. The Proof of Work enum is a specific Poka-Yoke technique: instead of preventing invalid input values, it prevents invalid reasoning states.
The "think" tool. Anthropic's "think" tool (published March 2025) gives Claude a dedicated tool for extended reasoning. Both patterns force the model to pause and reason before acting. The Proof of Work enum is lighter weight. It adds one required field to an existing tool rather than introducing a separate reasoning tool.
Structured output enforcement. OpenAI's Structured Outputs (August 2024) and Anthropic's strict mode both enforce JSON Schema compliance at the model level. GPT-4 without enforced output schemas achieved less than 40% schema compliance in production analysis. With enforcement, compliance reaches 100%. The Proof of Work enum relies on this infrastructure. Without strict mode, the model can hallucinate values outside the enum.
Pre-completion checklists. LangChain's harness engineering pattern uses middleware to force verification before agent exit. The Proof of Work enum achieves the same goal from inside the tool schema rather than from an external orchestration layer.
Limitations and Gotchas
No verification of verification. The biggest limitation. The enum forces selection, not actual verification. You get the agent's claim. You do not get proof that the claim is true. For safety-critical applications, you still need external validation.
Enum exhaustion. The AgentPatterns.ai Poka-Yoke catalog warns about this: "A fixed enum valid at design time excludes production edge cases." If you define three verification states and the agent encounters a fourth state, it cannot proceed. The pattern works best when the verification states are known and stable.
Prerequisite deadlock. Read-before-write gates block optimistic-write patterns. If your agent sometimes needs to write without first reading (creating a new file from scratch, for example), a required "I have read this file" enum will deadlock. Design your enums to match the actual workflow, not just the happy path.
Designer blind spots. The AgentPatterns.ai catalog also warns: "Constraints encode the designer's model of valid usage. Legitimate emergent reasoning strategies get rejected." Your enum values reflect your assumptions about how the agent should reason. The agent may discover valid approaches you did not anticipate.
Training data alignment. The pattern works best when enum value names align with the model's training. VERIFIEDSAFETOPROCEED works because it uses common English phrases that the model has seen millions of times. STATEALPHA would be less effective because the model has weaker priors for interpreting it.
Token cost. Each enum parameter adds tokens to every tool call. For agents making hundreds of calls, this adds up. The cost is usually justified by the compliance improvement, but it is not zero.
Model dependency. The deterministic compliance claim applies to frontier models (Sonnet 4.5+, GPT-5.1+). Smaller or less capable models may not reliably select the correct enum value. The pattern depends on the model understanding the semantic weight of each choice.
Practical Guidelines
Based on the pattern and its limitations, here are practical guidelines for implementation.
Use Proof of Work enums for irreversible or high-risk actions. Deployments, deletions, financial transactions, and content publication are natural candidates. Low-stakes actions like read queries do not need this overhead.
Pair with a deterministic catch. The Reddit post emphasizes this: "On the off chance the negative enum is selected? We add a deterministic catch. Tool short-circuits: 'verify prerequisites before continuing.' Hard stop." Always handle the negative enum value with application logic, not just hope.
Keep enum values self-explanatory. Use VERIFIEDALLPREREQUISITES_MET rather than OK. The model needs to understand what it is claiming. Vague enum values defeat the purpose.
Frame positive values as the "good assistant" choice. The pattern leverages the model's training to be helpful. VERIFIEDSAFETOPROCEED frames verification as success. NOTVERIFIEDDONOT_PROCEED frames skipping verification as failure. This alignment with the model's desire to succeed makes the pattern more effective.
Provide complete context. The pattern works when the agent has enough information to make an honest choice. If you omit critical context, the agent may select the positive value based on incomplete reasoning. "With complete context there are no blanks to fill," as the original post notes.
Start with binary enums. Two values (safe / not safe) are easier for the model to reason about than five verification states. Complexity in enum values creates the same attention dilution problem you are trying to solve.
Test with the specific models you deploy. The compliance claim is model-dependent. Verify on your target model before relying on this pattern in production.
The Broader Implication
The Proof of Work enum pattern reveals something important about agent design. The best context engineering is not always about what you put into the prompt. Sometimes it is about what you do not have to put in.
The pattern replaces long system prompt instructions with a single constrained field. Those instructions are still available as the enum description. But they are read at the moment of decision, not 30 turns ago. The timing of information matters as much as the content.
This connects to the broader trend toward structural enforcement over prompt-based guidance. OpenAI's Structured Outputs guarantee 100% schema compliance. Anthropic's strict mode does the same. The AgentPatterns.ai Poka-Yoke pattern catalog documents a family of related techniques. The Proof of Work enum is one more tool in this toolkit.
The framing is also worth noting. The original poster calls these "guardrails that adapt with instead of blocking increases in model intelligence." This is a key distinction. Traditional guardrails block actions. Proof of Work enums channel reasoning. As models get smarter, the channeling becomes more effective, not less. A smarter model better understands what VERIFIEDSAFETO_PROCEED means and more honestly evaluates whether it can claim that status.
This is the direction agent design is moving. Not more rules. Smarter constraints. Not longer prompts. Better-placed information. The Proof of Work enum is a clean example of this principle in action.
Citations
- Reddit post by u/OnlyInternal7266: "More context with fewer tokens — using 'Proof of Work' enums to leverage trained behavior instead of bloated/lost system prompt instructions in agentic loops." r/aiagents. https://www.reddit.com/r/aiagents/comments/1rngnwe/morecontextwithfewertokensusingproof_of/
- AgentPatterns.ai: "Poka-Yoke for Agent Tools." https://agentpatterns.ai/tool-engineering/poka-yoke-agent-tools/
- Anthropic: "Building Effective Agents." December 19, 2024. https://www.anthropic.com/engineering/building-effective-agents
- Anthropic: "Raising the bar on SWE-bench Verified with Claude 3.5 Sonnet." October 30, 2024. https://www.anthropic.com/news/swe-bench-sonnet (source for "Change the arguments so that it is harder to make mistakes" and tool design optimization quote)
- Anthropic: "The 'think' tool: Enabling Claude to stop and think in complex tool use situations." March 20, 2025. https://anthropic.com/engineering/claude-think-tool
- Tian Pan blog: "Tool Use in Production: Function Calling Patterns That Actually Work." https://tianpan.co/blog/2025-10-12-tool-use-function-calling-patterns (source for Structured Outputs compliance data: <40% without enforcement, 100% with enforcement)
- OpenAI: "Introducing Structured Outputs in the API." August 6, 2024. https://openai.com/index/introducing-structured-outputs-in-the-api
- arXiv:2604.18389: "Understanding Prompt Sensitivity." Under review at ICLR 2026. (source for prompt template influence exceeding question influence)
- arXiv:2604.18897: "Cognitive Load and the Single-Prompt Ceiling." (source for hard accuracy ceiling of 60-79% and 0% TRUE recall in weaker models above 2KB prompts)
- Anthropic: "Advanced Tool Use." November 24, 2025. https://www.anthropic.com/engineering/advanced-tool-use (source for 72% to 90% accuracy improvement from concrete examples in tool descriptions)
- LangChain: "Improving Deep Agents with Harness Engineering." https://blog.langchain.com/improving-deep-agents-with-harness-engineering/ (source for pre-completion checklist pattern)
Suggested Title
Proof of Work Enums: The Simplest Guardrail That Actually Works
Word Count
2,430
Fact-Check Notes
- Reddit post details: The Reddit post is real and was accessed via JSON API. Author is u/OnlyInternal7266. The specific claims about "zero evidence" of hallucination with Sonnet 4.5+ and GPT-5-1 are the poster's claims, not independently verified research. I have presented them as such and added nuance.
- Anthropic "change the arguments" quote: The exact phrasing "Change the arguments so that it is harder to make mistakes" appears in the AgentPatterns.ai Poka-Yoke article, which cites Anthropic's "Building Effective Agents" page. I have cited both sources. The SWE-bench Sonnet team quote about spending more time on tools than prompts is from the same Anthropic source.
- Structured Outputs compliance numbers (<40% → 100%): These come from Tian Pan's blog post, which cites production analysis data. I have cited the source. These are specific to GPT-4 without structured outputs enforcement.
- 72% to 90% accuracy improvement: This comes from Anthropic's "Advanced Tool Use" post, which is also cited in the AgentPatterns.ai Poka-Yoke article. I have cited the original Anthropic source.
- ICLR 2026 papers: The prompt sensitivity paper (arXiv:2604.18389) and cognitive load paper (arXiv:2604.18897) are cited as under review at ICLR 2026. These citations come from our prior research and article writing. The specific claims about Llama 3.3 70B hitting 0% TRUE recall above 2KB prompts come from the cognitive load paper.
- MVP2o attribution: The Reddit poster mentions "We're leaning hard into this kind of thing at MVP2o." MVP2o is a small AI consulting company (mvp2o.ai). This is a minor attribution detail and not central to the article's claims.
- The term "Proof of Work": This is borrowed from cryptocurrency, where it refers to computational effort required to produce a block. In the agent context, it means the agent must produce reasoning effort (selecting the correct enum value) before it can take an action. The analogy is loose but evocative. The Reddit poster coined this usage for the enum pattern specifically.