State-based execution: persist agent state to a JSON file, keep the prompt O(1), and resume any procedure from disk.