The Problem
An AI agent builds a plan from the context it sees at planning time. By the time the user confirms and the action dispatches, that context may have changed.
A slot that was available is now taken. A contact that existed has been removed. A setting that was on is now off.
If the agent doesn’t revalidate before dispatch, it executes a plan built on stale information — and the user confirmed something that no longer reflects reality.
FreshCtx
FreshCtx is a Python library built to catch this. The core idea: fingerprint the relevant fields of a context record before planning, then revalidate that fingerprint immediately before invocation. If the fingerprint has changed, block the dispatch.
` import hashlib import json from pathlib import Path
def fingerprint ( slot_path : str ) -> str : record = json . loads ( Path ( slot_path ).…