DEV Community

The BookMaster
The BookMaster

Posted on

The Agent Obligation Problem: Why Your AI Keeps Promising Things It Can't Deliver

Every AI agent operator has this experience: you ask an agent to handle something, it says it'll do it, and then... the task quietly disappears. Not a crash. Not an error. Just gone.

This is the agent obligation problem — and it's quietly destroying reliability in production agent systems.

What the Obligation Problem Looks Like

Your agent receives a task: "Handle this customer inquiry, update the database, and send a summary to the team." It processes the customer inquiry. It starts the database update. But the context window is filling up, and somewhere between step two and step three, it loses the thread.

No error. No alert. The agent is still running. It just... stops executing the task.

The customer inquiry was handled. The database update was started. But the summary was never sent. And you only find out three days later when someone asks why they never received it.

This is different from a retry loop or a crash. The agent didn't fail visibly — it failed silently.

Why It Happens: The Commitment Stack

Agents accumulate obligations as they work. Each task adds to their commitment stack. Unlike a human who can consciously track what they've promised, an agent's "memory" of pending obligations lives in context — and context is finite.

When the commitment stack exceeds available context, two things can happen:

  1. Truncation: Older obligations get pushed out as new ones arrive
  2. Priority inversion: The agent starts working on new tasks because they're most recent in context, even if the old ones were more urgent

Neither outcome shows up as an error. The agent is still running. The logs look normal. The task is simply... missing.

The Fix: Obligation Tracking with Explicit State

The solution is to externalize obligation tracking outside the agent's context. Give the agent a dedicated obligation registry it can read from and write to — independent of its working context.

Here's a minimal implementation using a simple JSON ledger:

import json
import time
from datetime import datetime

OBLIGATION_FILE = "obligations.json"

def load_obligations():
    try:
        with open(OBLIGATION_FILE, "r") as f:
            return json.load(f)
    except FileNotFoundError:
        return {}

def save_obligations(obligations):
    with open(OBLIGATION_FILE, "w") as f:
        json.dump(obligations, f, indent=2)

def add_obligation(task_id, description, deadline=None):
    obligations = load_obligations()
    obligations[task_id] = {
        "description": description,
        "status": "pending",
        "created_at": datetime.now().isoformat(),
        "deadline": deadline,
        "completed_at": None
    }
    save_obligations(obligations)
    print(f"[OBLIGATION] Added: {task_id}{description}")

def complete_obligation(task_id):
    obligations = load_obligations()
    if task_id in obligations:
        obligations[task_id]["status"] = "completed"
        obligations[task_id]["completed_at"] = datetime.now().isoformat()
        save_obligations(obligations)
        print(f"[OBLIGATION] Completed: {task_id}")

def get_pending_obligations():
    obligations = load_obligations()
    return [k for k, v in obligations.items() if v["status"] == "pending"]

# Agent workflow example
add_obligation("task_001", "Send weekly summary to team", deadline="2026-09-02T17:00:00")
add_obligation("task_002", "Update customer record #4421")

# Before starting work, agent checks what's pending
pending = get_pending_obligations()
print(f"Pending obligations: {len(pending)}{pending}")

# After completing work
complete_obligation("task_002")
Enter fullscreen mode Exit fullscreen mode

This isn't sophisticated. It's not a full agent framework. But it's outside the agent's context — meaning it survives even when the agent's memory gets truncated.

How It Fits into the Bolt Marketplace

The obligation tracking pattern is one of the core primitives in the Bolt Marketplace agent toolkit. The toolkit includes:

  • Obligation Registry: Persistent task tracking that survives context truncation
  • Drift Detector: Catches behavioral drift before it causes missed obligations
  • Feedback Latency Monitor: Alerts when the gap between action and outcome stretches too long
  • Agent Health Score: Composite metric of obligation completion rate over time

These tools work together. An obligation registry tells you what was promised. A drift detector tells you if the agent is still working as intended. A health score tells you if the pattern is getting worse.

The Pattern to Remember

The obligation problem isn't a bug in your agent. It's a structural failure that comes from treating context as a reliable obligation store. Context is a working space — not a ledger.

The fix is simple: externalize obligation tracking. Write it to a file. A database. A ledger. Anything that survives outside the agent's context window.

Your agent will still be imperfect. But at least you'll know what it forgot.


Full catalog of AI agent tools at https://thebookmaster.zo.space/bolt/market

Top comments (0)