=== diff scripts/three_frameworks.py scripts_guarded/three_frameworks.py
--- ../scripts/three_frameworks.py	2026-11-19 00:44:11.935570800 +0100
+++ three_frameworks.py	2026-11-19 01:41:05.028797800 +0100
@@ -18,6 +18,8 @@
 import tempfile
 from pathlib import Path
 
+import c4a_guard
+
 HERE = Path(__file__).resolve().parent
 KIT = os.environ.get("C4A_KIT_ROOT", str(HERE.parent / "call4agents-release"))
 
@@ -31,15 +33,20 @@
             f.write(json.dumps({"amount": amount, "to": to}) + "\n")
             f.flush()
             os.fsync(f.fileno())
+        if use_kit:
+            c4a_guard.mark_ran()
         if crash:
             os._exit(17)                       # paid; the framework has not saved its progress
         return "paid"
     if not use_kit:
         return pay, None
-    sys.path.insert(0, KIT)
-    import call4agents as c4a
-    c4a.init(str(work / "c4a.sqlite"), secret=b"finding-secret-0123")
-    return c4a.effect(pay, name="pay", approval=True), c4a
+    # 2026-11-19 guarded rerun: call4agents from the venv (PyPI 0.7.3), not from a source checkout
+    call, c4a = c4a_guard.wrap_sync(work, pay, run_id)
+
+    def guarded_pay(**args):
+        r, refused = call(**args)
+        return refused if refused else r
+    return guarded_pay, c4a
 
 
 # ------------------------------------------------------------------ LangGraph
@@ -67,11 +74,9 @@
     def tools(state):
         if state.get("approved"):
             if c4a:
-                with c4a.run("thread-1"):
-                    try:
-                        pay(**state["call"])
-                    except (c4a.ApprovalRequired, c4a.EffectInDoubt) as exc:
-                        return {"refused": type(exc).__name__}
+                r = pay(**state["call"])
+                if isinstance(r, str) and r.startswith("refused"):
+                    return {"refused": r}
             else:
                 pay(**state["call"])
         return {}
@@ -89,8 +94,7 @@
         if case == "edited_after_yes":
             graph.update_state(cfg, {"call": {"amount": 9999, "to": "mallory"}})
         if c4a:
-            with c4a.run("thread-1"):
-                c4a.approve("pay", amount=10, to="alice")          # the person said yes to what they SAW
+            c4a_guard.approve(work, "thread-1", amount=10, to="alice")   # the person said yes to what they SAW
         graph.invoke(Command(resume="yes"), cfg)
         return
     if phase == "resume":
@@ -98,6 +102,8 @@
         if "__interrupt__" in (out or {}):
             (work / "asked_again.txt").write_text("yes")           # LangGraph asks for the approval again
         return
+    if c4a and (work / "asked_again.txt").exists():
+        c4a_guard.approve(work, "thread-1", amount=10, to="alice")   # guarded rerun: the app records the second yes too
     graph.invoke(Command(resume="yes"), cfg)                       # phase "reapprove": the person says yes again
 
 
@@ -120,12 +126,6 @@
 
     @agent.tool_plain(requires_approval=True)
     def pay(amount: int, to: str) -> str:
-        if c4a:
-            with c4a.run("conv-1"):
-                try:
-                    return pay_fn(amount=amount, to=to)
-                except (c4a.ApprovalRequired, c4a.EffectInDoubt) as exc:
-                    return f"refused: {type(exc).__name__}"
         return pay_fn(amount=amount, to=to)
 
     saved = work / "history.json"
@@ -141,8 +141,7 @@
                     part.args = {"amount": 9999, "to": "mallory"}
             saved.write_bytes(ModelMessagesTypeAdapter.dump_json(history))
         if c4a:
-            with c4a.run("conv-1"):
-                c4a.approve("pay", amount=10, to="alice")
+            c4a_guard.approve(work, "conv-1", amount=10, to="alice")
     # "approve" and "resume" both run with the stored history + the stored approval (how an app resumes)
     agent.run_sync(message_history=history, deferred_tool_results=DeferredToolResults(approvals={"c1": True}))
 
@@ -179,12 +178,6 @@
     @function_tool(needs_approval=True)
     def pay(amount: int, to: str) -> str:
         """Pay someone."""
-        if c4a:
-            with c4a.run("session-1"):
-                try:
-                    return pay_fn(amount=amount, to=to)
-                except (c4a.ApprovalRequired, c4a.EffectInDoubt) as exc:
-                    return f"refused: {type(exc).__name__}"
         return pay_fn(amount=amount, to=to)
 
     agent = Agent(name="payer", instructions="pay", tools=[pay], model=FakeModel())
@@ -206,8 +199,7 @@
         if phase == "approve":
             saved.write_text(json.dumps(state.to_json()))       # the app stores the approved state first
             if c4a:
-                with c4a.run("session-1"):
-                    c4a.approve("pay", amount=10, to="alice")
+                c4a_guard.approve(work, "session-1", amount=10, to="alice")
         await Runner.run(agent, state)
     asyncio.run(go())
 
@@ -223,16 +215,16 @@
     codes = []
     for phase in phases:
         p = subprocess.run([sys.executable, __file__, "_child", fw, str(work), case, "1" if use_kit else "0", phase],
-                           capture_output=True, text=True, timeout=300)
+                           capture_output=True, text=True, timeout=300, env=dict(os.environ, C4A_PHASE=phase))
         codes.append(p.returncode)
         if p.returncode not in (0, 17):
             raised = (p.stderr.strip().splitlines() or ['?'])[-1][:200]
             pays = (work / "payments.txt").read_text().splitlines() if (work / "payments.txt").exists() else []
             return {"payments": len(pays), "paid": [json.loads(l) for l in pays], "exit_codes": codes + [p.returncode],
-                    "raised_in_" + phase: raised}
+                    "raised_in_" + phase: raised, **(c4a_guard.report(work) if use_kit else {})}
     pays = [json.loads(l) for l in (work / "payments.txt").read_text().splitlines()] if (work / "payments.txt").exists() else []
     return {"payments": len(pays), "paid": pays, "exit_codes": codes,
-            "asked_again": (work / "asked_again.txt").exists()}
+            "asked_again": (work / "asked_again.txt").exists(), **(c4a_guard.report(work) if use_kit else {})}
 
 
 def main():
@@ -253,5 +245,8 @@
         # 2026-11-19: one run of one case, no guard, as JSON. Cases: approve_then_crash, no_crash
         # (control: start + approve, no crash, no extra resume), edited_after_yes
         print(json.dumps(run_case(sys.argv[2], sys.argv[3], False)))
+    elif len(sys.argv) > 1 and sys.argv[1] == "one_guarded":
+        # 2026-11-19 guarded rerun: the same case, with call4agents on the tool. Cases: approve_then_crash, no_crash
+        print(json.dumps(run_case(sys.argv[2], sys.argv[3], True)))
     else:
         main()
=== diff scripts/adk_confirm_crash.py scripts_guarded/adk_confirm_crash.py
--- ../scripts/adk_confirm_crash.py	2026-11-19 00:44:33.406890400 +0100
+++ adk_confirm_crash.py	2026-11-19 01:42:06.503187100 +0100
@@ -26,7 +26,10 @@
 import tempfile
 from pathlib import Path
 
+import c4a_guard
+
 APP, USER, SESSION = "payapp", "u1", "s1"
+GUARDED = os.environ.get("C4A_GUARDED") == "1"     # 2026-11-19 guarded rerun: call4agents on the tool
 
 
 def build(work: Path):
@@ -53,16 +56,28 @@
                 part = types.Part(function_call=types.FunctionCall(name="pay", args={"amount": 10, "to": "alice"}))
             yield LlmResponse(content=types.Content(role="model", parts=[part]))
 
-    def pay(amount: int, to: str) -> dict:
+    def raw_pay(amount: int, to: str) -> dict:
         """Pay an amount to a person."""
         with open(work / "payments.txt", "a") as f:
             f.write(f"{amount} {to}\n")
             f.flush()
             os.fsync(f.fileno())
+        if GUARDED:
+            c4a_guard.mark_ran()
         if os.environ.get("KILL_AFTER_PAY") == "1":
             os._exit(17)                       # crash after the side effect, before ADK stores the result
         return {"receipt": f"paid {amount} to {to}"}
 
+    if GUARDED:
+        call, _ = c4a_guard.wrap_sync(work, raw_pay, SESSION)
+
+    def pay(amount: int, to: str) -> dict:
+        """Pay an amount to a person."""
+        if not GUARDED:
+            return raw_pay(amount=amount, to=to)
+        r, refused = call(amount=amount, to=to)
+        return {"result": refused} if refused else r
+
     agent = LlmAgent(name="payer", model=FakeLlm(), instruction="Pay when asked.",
                      tools=[FunctionTool(pay, require_confirmation=True)])
     app = App(name=APP, root_agent=agent, resumability_config=ResumabilityConfig(is_resumable=True))
@@ -100,6 +115,8 @@
 
     c = json.loads(st.read_text())
     if name == "approve":
+        if GUARDED:
+            c4a_guard.approve(work, SESSION, amount=10, to="alice")
         ev = await collect(runner.run_async(user_id=USER, session_id=SESSION, invocation_id=c["invocation_id"],
                                             new_message=yes(c)))
         return {"asked_again": len(confirmations(ev)), "texts": texts(ev)}
@@ -108,6 +125,8 @@
         again = confirmations(ev)
         out = {"asked_again": len(again), "texts": texts(ev)}
         if again:                              # a person may say yes again, not knowing the first one paid
+            if GUARDED:
+                c4a_guard.approve(work, SESSION, amount=10, to="alice")
             ev2 = await collect(runner.run_async(user_id=USER, session_id=SESSION,
                                                  invocation_id=again[-1]["invocation_id"], new_message=yes(again[-1])))
             out["texts"] += texts(ev2)
@@ -141,7 +160,7 @@
 
 
 def run(work, name, kill=False):
-    env = dict(os.environ, KILL_AFTER_PAY="1" if kill else "0")
+    env = dict(os.environ, KILL_AFTER_PAY="1" if kill else "0", C4A_PHASE=name)
     p = subprocess.run([sys.executable, __file__, "--phase", str(work), name], capture_output=True, text=True,
                        env=env, timeout=120)
     try:
@@ -170,6 +189,8 @@
             r["approve"] = run(w, "approve", kill=True)
             r["resume"] = run(w, "resume")
         r["payments"] = payments(w)
+        if GUARDED:
+            r.update(c4a_guard.report(w))
         return r
 
 
=== diff scripts/maf_approve_crash.py scripts_guarded/maf_approve_crash.py
--- ../scripts/maf_approve_crash.py	2026-11-19 00:44:33.234924200 +0100
+++ maf_approve_crash.py	2026-11-19 01:42:34.838301300 +0100
@@ -32,7 +32,11 @@
 import tempfile
 from pathlib import Path
 
+import c4a_guard
+
 PROMPT = "Pay alice 10."
+GUARDED = os.environ.get("C4A_GUARDED") == "1"     # 2026-11-19 guarded rerun: call4agents on the tool
+RUN_ID = "payflow-1"                               # the workflow has one run per temp folder
 
 
 def build(work: Path):
@@ -52,8 +56,7 @@
                 raise NotImplementedError("the test uses non-streaming runs")
             return _get()
 
-    @tool(approval_mode="always_require")
-    def pay(amount: int, to: str) -> str:
+    def raw_pay(amount: int, to: str) -> str:
         """Pay an amount to a person."""
         line = f"{amount} {to}"
         if os.environ.get("GUARD") == "1" and (work / "payments.txt").exists()                 and line in (work / "payments.txt").read_text().splitlines():
@@ -62,10 +65,23 @@
             f.write(f"{amount} {to}\n")
             f.flush()
             os.fsync(f.fileno())
+        if GUARDED:
+            c4a_guard.mark_ran()
         if os.environ.get("KILL_AFTER_PAY") == "1":
             os._exit(17)                       # crash after the side effect, before the workflow stores anything
         return f"paid {amount} to {to}"
 
+    if GUARDED:
+        call, _ = c4a_guard.wrap_sync(work, raw_pay, RUN_ID)
+
+    @tool(approval_mode="always_require")
+    def pay(amount: int, to: str) -> str:
+        """Pay an amount to a person."""
+        if not GUARDED:
+            return raw_pay(amount=amount, to=to)
+        r, refused = call(amount=amount, to=to)
+        return refused if refused else r
+
     agent = Agent(client=FakeClient(), name="payer", instructions="Pay when asked.", tools=[pay])
     storage = FileCheckpointStorage(work / "ckpt")
     wf = WorkflowBuilder(start_executor=agent, checkpoint_storage=storage, name="payflow").build()
@@ -99,6 +115,9 @@
     out = {"checkpoints_before": n, "asked": len(pending),
            "pending_args": [p[1].function_call.parse_arguments() for p in pending]}
     if pending:                                # approve phase: the first yes; resume phase: a yes given again
+        if GUARDED:
+            for _, d in pending:               # the app records the person's yes for exactly what they saw
+                c4a_guard.approve(work, RUN_ID, **d.function_call.parse_arguments())
         r2 = await wf.run(responses={rid: d.to_function_approval_response(approved=True) for rid, d in pending})
         out["asked_again_after_yes"] = len(approvals(r2))
         out["outputs"] = [str(o)[:80] for o in r2.get_outputs()]
@@ -140,7 +159,7 @@
 
 
 def run(work, name, kill=False, back=0):
-    env = dict(os.environ, KILL_AFTER_PAY="1" if kill else "0", BACK=str(back))
+    env = dict(os.environ, KILL_AFTER_PAY="1" if kill else "0", BACK=str(back), C4A_PHASE=name)
     p = subprocess.run([sys.executable, __file__, "--phase", str(work), name], capture_output=True, text=True,
                        env=env, timeout=180)
     try:
@@ -176,6 +195,8 @@
             r["approve"] = run(w, "approve", kill=True)
             r["resume"] = run(w, "resume")
         r["payments"] = payments(w)
+        if GUARDED:
+            r.update(c4a_guard.report(w))
         return r
 
 
