When is memory safe enough to act on? Action-conditioned verification for long-lived agentsWhen Is a Memory Safe Enough to Act On? Action-Conditioned Verification for Long-Lived Agents
The authors propose action-conditioned memory verification (AMV) and the AMV-Guard gate, which on ToolSandbox reduces verification cost by 33.9% relative to a static policy while maintaining 100% safe-proceed recall and 0% Gate harmful.
Long-horizon agents carry persistent memory across sessions, and that memory may be stale; only COMMIT actions that change state or have external consequences enter the Gate. The defender can see the memory graph and candidate actions and can query verifiers with different costs and reliabilities, with the goal of deciding PROCEED, verify, or ABSTAIN at minimum total cost.
- Long-horizon agents execute irreversible actions based on cross-session memory, and stale memory directly turns into harm; the authors argue that whether memory should be re-checked does not depend on the memory itself, but on the action about to be executed and the cost of its failure.
- The authors formalize action-conditioned memory verification as a sequential stopping problem with an abstention option, and propose AMV-Guard: extract the premises that candidate actions depend on, calibrate memory error probabilities, greedily select verifications by bounded VOI, and re-decide after each observation.
- On ToolSandbox, AMV-Guard reduces verification cost by 33.9% relative to the static policy, maintains 100% safe-proceed recall and 0% Gate harmful, and raises Proceed coverage from 38.83% to 44.17%; in the AppWorld gate-core transfer, cost drops by 21.28%, but task success rate and safety recall decrease slightly.
- The authors note that precondition extraction partially depends on the model, and extractor recall constitutes an upper bound; the deployed planner is a bounded approximation, and the multi-precondition verifier is approximated by a single shared binary observation; experiments are conducted only on two simulated environments, ToolSandbox and AppWorld, and three backbone models, and harm rates cover only consequences scored by the simulator.
- Evaluated models
- Qwen3.5-35B-A3B (qwen3.5-35b-a3b)Qwen3.5-27B (qwen3.5-27b)DeepSeek-V4.1-Flash (deepseek-flash)
- Benchmarks
- ToolSandboxAppWorld
- Metrics
- Safe-proceed recallGate harmfulVerify costTask successRaw harmProceed coverageUnsafe Pass RateECE/Brier/NLL
Researchers propose action-conditioned memory verification, enabling long-lived agents to determine, before executing an action, which memory premises need to be rechecked and when to continue executing or abandon, and model it as a sequential stopping problem. Under suitable conditions of verifier reliability and cost, greater action consequences cause the same memory to undergo three states: continue, recheck, and directly abandon. Based on this, the constructed verification-gated AMV-Guard extracts the memory premises on which candidate actions depend, calibrates its belief about whether they are erroneous, and selects check items according to bounded value of information (VOI). On ToolSandbox, compared with a static policy under the same inputs, AMV-Guard reduces average verification cost by 33.9%, maintains 100% safe-proceed recall and 0% Gate harmful, and raises Proceed coverage from 38.83% to 44.17%; after migrating the gating core to AppWorld, verification cost decreases by 21.3%, while safe-proceed recall and task success rate decrease slightly.
Paper analysis
What problem does this paper attempt to solve?
The authors study action-conditioned memory verification: whether memory should be re-checked depends on the action and its consequences, not on the memory itself.
Core question: before a long-horizon agent executes an irreversible action based on possibly stale memory, which memory preconditions should be verified, and when should it execute directly or abstain.
- Scenario and motivation: Cross-session agents accumulate persistent memory, many actions are irreversible, and stale memory directly turns into harm. The authors cite an existing finding: on a stale-memory benchmark, even when updated evidence is retrieved, the best model's accuracy is only 55.2% (Chao et al., 2026).
- Shortcomings of existing methods: The authors argue that memory-centric methods (retrieval, refresh, reconciliation) answer questions about memory; environment grounding and cost-aware information acquisition each contribute, but the quantity by which they decide what to verify either ignores the action or ignores how multiple preconditions jointly support the action—an action-independent score cannot distinguish mailing a document from mailing a high-priced item.
- Core observation: The same memory (same address, same confidence 0.72) should be executed directly when mailing an ordinary document, but should be re-checked first when mailing a $2,000 laptop, and refused if it cannot be confirmed (Figure 1). Verification need is determined by the action and the cost of failure, and cannot be computed from memory-side features alone.
- Contributions of the paper: The authors distinguish memory validity from action-specific verification need, formalize the problem as a sequential stopping problem with an ABSTAIN termination decision, and propose an executable verification gate, AMV-Guard.
- Threat model:
- Victim system: A long-horizon agent carrying a persistent memory graph and executing tool actions in ToolSandbox/AppWorld-like environments.
- Source of risk: Memory may be stale (hidden perturbations change world state); only COMMIT actions that change state or have external consequences enter the Gate.
- Defender knowledge and capabilities: Can see the memory graph and candidate actions, and can invoke verifiers that differ in cost, reliability, and availability; cannot see the hidden world state.
- Objective: Decide PROCEED, verify, or ABSTAIN under minimal total cost (execution loss + abstention cost + verification cost).
What related research exists?
Related work falls into three groups: long-term memory, active grounding and environment probing, and cost-aware acquisition and abstention; the authors state the difference is that verification needs are conditioned on the action.
Long-term agent memory
- MemGPT (Packer et al., 2023), MemoryBank (Zhong et al., 2024), HippoRAG (Gutiérrez et al., 2024), A-MEM (Xu et al., 2025): Improve the relevance and consolidation mechanisms of agent storage and retrieval.
- STALE (Chao et al., 2026): Detects stale memory and revises it at write time; FreshLLMs (Vu et al., 2024) handles outdated knowledge; Xu et al. (2024) and Xie et al. (2024) study knowledge conflicts; Meng et al. (2022) directly edits knowledge in model weights.
- Wu et al. (2026): Actively decides when to present memory. The authors argue that these methods improve the memory store itself, and the quantity they compute is action-independent—exactly the gap formalized by Proposition 1 of this paper and measured in Section 5.3.
Active grounding and environment probing
- ACCORD (Jiang et al., 2026): Probes the environment for context not stated in the instruction.
- EnvProbe (Song and Cai, 2026): The main comparison object of this paper; at each step it queries one belief field of a structured world model, scoring by task criticality, staleness, verbal uncertainty, and dependency role. The authors point out three differences: this paper verifies sourced persistent memory claims rather than the current belief table; verifier costs and reliabilities differ and some preconditions have no verifier; this paper selects verification sequences, models multi-precondition verifiers, and allows the agent to refuse.
Cost-aware acquisition and selective prediction
- Classic work: Value of information theory (Howard, 1966), sequential testing (Wald, 1945), adaptive submodularity (Golovin and Krause, 2011); the reject option for abstention (Chow, 1970) through recent surveys (Wen et al., 2025) and the agent benchmark AgentAbstain (Liu et al., 2026).
- Calibrate-Then-Act (Ding et al., 2026): Performs cost-aware exploration before committing an action. The authors explicitly state that they do not claim this mechanism as a contribution of this paper; the difference lies in the application setting: multiple preconditions per action, verifiers with overlapping coverage and differing reliability, and adaptive selection of the next check.
Baselines and benchmarks
- Baseline methods: Always Proceed, Always Verify, AMV-Static, an adapted version of EnvProbe (EnvProbe-Simple), and the cost-aware baseline CTA; the reference is the information-limited exact planner ExactPlanner-PredictedDep (used only as an evaluation reference, not as supervision).
- Benchmarks: ToolSandbox (3,520 frozen instances) and AppWorld (100 state-changing tasks, 200 episodes).
The authors position this paper as placing classic VOI and Bayesian stopping mechanisms into a multi-precondition, multi-verifier, abstention-capable action-conditioned setting, rather than proposing a new theory of value of information.
How does the paper address this problem?
AMV-Guard places a gate between the planner and the executor: it extracts action premises, calibrates memory-error beliefs, greedily verifies by bounded VOI, and can abstain at any time.
Overall approach: model "what to verify" as a sequential stopping problem conditioned on the candidate action; AMV-Guard sits between the planner and the executor, extracts premises for each COMMIT candidate, forms calibrated beliefs, and then decides to verify, execute, or abstain (Figure 2).
Problem Formalization
- Distinguishing three kinds of memory (Definition 1): relevant (semantically related as returned by retrieval) ⊇ action-supporting (supports some premise of the action) ⊇ critical (its error would materially change execution loss). The authors argue the verification budget should be spent on the innermost layer; criticality is a property of (a, L), not of a memory m alone.
- Stopping value: define posterior execution loss R(b,a)=Ez∼ b[L(PROCEED(a),z)] and harm probability Hδ; PROCEED is allowed only when R(b,a) ≤ min{δ, κ} and Hδ(b,a) ≤ ϵ, otherwise the stopping value is the abstention cost κ (Equation 2).
- Core proposition (Proposition 1): when verifier reliability and cost conditions are appropriate, as the consequence θ increases, the optimal decision for the same memory passes through three regions in order: PROCEED, VERIFY, direct ABSTAIN; the verification region is bracketed by κ/p− ≤ θ1 ≤ θ2 ≤ κ/p+. The authors therefore argue that ABSTAIN must be a directly reachable terminal decision, and verifier reliability must be modeled.
- Why reducing loss for a fixed action is not enough (Remark 1): the authors show that under Bayesian updating, observations do not change the expected loss of a fixed action, so naive VOI is always −λC(q) ≤ 0, and a planner that uses it to "verify whenever positive" will never verify; the value of information comes only from being able to change the terminal decision.
Premise Extraction
- Extract premises from the candidate action, tool schema, plan prefix and memory graph, labeling supporting claims and dependency types (direct/transitive/joint).
- The LLM extractor and a public tool-contract rule layer independently propose premises; LLM proposals must land on memory identifiers, verifiers, or public action targets; a counterfactual filter learned on the training split removes repeatedly irrelevant tool–target pairs.
- The current implementation uses dependency labels and simplified coupling assumptions: multi-premise verifiers are represented by one shared binary observation, and joint premises share one latent variable sample; this is an approximation, not general joint dependency inference (Appendix B).
Calibration and Risk
- Model self-reported confidence is used only as one feature; for each action-supporting claim, estimate pi = Pr(claim incorrect | features), with features covering recency, source, consistency, graph position and model signals (Appendix B.2).
- Fit a logistic base model on training instances, and select the calibration method among Platt, beta, and bounded-isotonic using held-out family likelihood and calibration error; the test set is used only for evaluation.
- Memory error probabilities are converted to action-premise violation probabilities, inducing a belief over z, which through the loss function L yields the stopping value; the ToolSandbox instantiation maps premises to four loss types: TaskFailure, WrongRecipient, PolicyViolation, OtherFailure, with weights for the first three fitted from the training split.
Adaptive Greedy Verification and Stopping
- At each Gate step, compute a one-step score VOI1(q) = Vstop(b,a) − [λ C(q) + Eo Vstop(bq,o,a)] for all affordable verifiers, and take the largest positive value; if none is positive and two-step fallback is enabled, take the largest positive two-step lookahead score VOI2 as the first query of a possibly complementary pair.
- After each observation, update the posterior by Bayes' rule and recompute all scores; the authors describe this as a bounded receding-horizon approximation to exact planning (Equation 3), and do not claim global optimality.
- Return PROCEED only when Equation (2) permits execution and no query has positive VOI; return ABSTAIN when no positive value exists and execution is infeasible; return REPLAN REQUIRED when the posterior of some required premise violation reaches threshold ρ, returning the candidate to the agent loop; replanning is not a VOI terminal action.
- Main configuration parameters: δ = 0.5, λ = 0.1, κ = 1, ρ = 0.95, ϵ = 0.05, episode-level budget 4; all selected on development data by a safety-first rule.
What experiments did the paper conduct?
On ToolSandbox, verification cost drops by 33.9% relative to the static policy and Gate harmful is 0%; in the AppWorld gate-core transfer, cost drops by 21.28% but success rate decreases slightly.
Experimental Setup
- Backbone models under test: Qwen3.5-35B-A3B (main experiments and AppWorld), Qwen3.5-27B, DeepSeek-V4.1-Flash (the latter two for cross-backbone evaluation), each using its own candidates, calibration and thresholds.
- Benchmarks: ToolSandbox contains 3,520 frozen instances (2,240/640/640 train/dev/test), with 3 observation seeds for the main test; AppWorld contains 100 state-change tasks, 200 episodes in total under clean and stale memory conditions, migrating only the stopping/VOI core, not the full pipeline.
- Baselines and references: Always Proceed, Always Verify, EnvProbe-Simple, CTA, AMV-Static; ExactPlanner-PredictedDep is an information-limited exact-planning reference, not used for supervision.
- Metrics: Safe-proceed recall (the proportion of candidates that are truly safe and Gate-evaluable that are executed), Gate harmful, Unsafe Pass Rate (diagnostic), verification cost, Proceed coverage, task success rate, Raw harm (end-to-end, including planning/intent failures).
- Evaluation method: Both environments have state-based native evaluators; success, policy violations and unintended state changes are measured rather than judged by a language model; ToolSandbox metrics exclude 40 test instances whose initial candidates have action/intent errors, leaving 600 per seed, 1,800 across three seeds.
- Repetition and intervals: ToolSandbox reports intervals across 3 observation seeds (Table 10); AppWorld uses a paired task-level bootstrap with 2,000 resamples.
Main Results
According to Table 1 (ToolSandbox end-to-end, 3 seeds × 640 test instances):
Swipe horizontally to read the table
Method Safe recall ↑ Gate harmful ↓ Verify cost ↓ Task success ↑ Raw harm ↓ Coverage ↑ Always proceed 100.00% 66.67% 0.000 68.23% 68.75% 100.00% Always verify all 100.00% 23.67% 1.976 74.58% 28.02% 62.67% EnvProbe-Simple 100.00% 49.00% 2.018 74.48% 52.19% 87.00% CTA 99.83% 63.61% 0.123 67.71% 65.89% 96.89% AMV-Static 100.00% 0.00% 1.843 72.34% 6.82% 38.83% AMV-Guard 100.00% 0.00% 1.219 73.91% 7.03% 44.17% ExactPlanner-PredictedDep 100.00% 0.00% 1.219 73.91% 7.03% 44.17% - Relative to AMV-Static, AMV-Guard reduces verification cost by 33.9%; both maintain 100% safe-proceed recall, 0% Unsafe Pass, and 0% Gate harmful; coverage is 5.33 percentage points higher, task success rate is 1.56 percentage points higher, and raw harm is 0.21 percentage points higher. Cost is 38.3% lower than verify-all.
- At the main operating point, AMV-Guard and ExactPlanner-PredictedDep agree on all reported metrics; the authors state this is an internal consistency of the modeling problem, not evidence of general optimality.
- Cross-backbone (Tables 5, 11): adaptive VOI reduces verification cost for all three backbones (33.9%, 42.3%, 58.9%), and Gate harmful is 0% for all three; however, for DeepSeek-V4.1-Flash, coverage drops from 45.31% to 39.63%, task success rate drops from 74.79% to 70.16%, and raw harm rises from 14.27% to 15.78%.
Contributions of Action Conditioning and Consequences (RQ2)
- Action-conditioning intervention (n = 500 profiles, Table 6): with the memory graph and verifier fixed, only the candidate action is changed; high-risk actions are verified 100% of the time, low-risk actions are executed directly 100% of the time, and each selected query covers the premises of its own candidate.
- Consequence intervention (n = 500 per level, Table 7): with action and memory evidence fixed, only the total loss is scaled; AMV-Guard's verification rates under low/medium/high loss are 0%, 15.8%, 62.8%, and harmful-proceed is 0% under high loss, whereas the version without loss conditioning (AMV-NoLoss) has a constant verification rate of 15.8% and harmful-proceed of 64.2% under high loss; other baselines without loss conditioning have harmful-proceed under high loss between 28.2% and 66.4%.
- Calibration (Table 8, test split n = 1,240 premise records): when all fitting data is used, ECE/Brier/NLL drop from 0.319/0.319/4.401 for raw confidence to 0.082/0.209/0.588, while the Gate maintains 100% safe-proceed recall and 0% Gate harmful.
When Adaptive Multi-step Verification Helps (RQ3)
- Controlled subset (n = 2,000, Table 2): relative to AMV-Static, adaptive (one-step greedy only, no two-step fallback) reduces expected objective by 0.0314 (95% CI [−0.0322, −0.0306]), raises safe completion rate by 4.15 percentage points, and reduces regret relative to the exact planner from 0.0746 to 0.0431, at the cost of 0.257 more average verification cost.
- Two-step fallback: under the selected development configuration (κ = 1, λ = 0.1, ρ = 0.95), enabling two-step fallback raises safe-proceed recall from 17.0% to 100% and Proceed coverage from 5.31% to 31.25%, both maintaining 0% harmful proceeds, with average verification cost rising from 0.059 to 1.213.
- The authors state that the adaptive multi-step rate is 6.8%, and that the gains are concentrated in these controlled conditions, supporting bounded adaptive fallback rather than adaptive being dominant on every benchmark.
Transfer and Out-of-Distribution Performance (RQ4)
- AppWorld gate-core transfer (Table 3, 190 Gate-evaluable instances): AMV-Guard reduces verification cost by 21.28% relative to AMV-Static (2.090 vs. 2.655), Gate harmful is 7.89% vs. 8.42%, and raw harm is 0.50 percentage points lower; however, task success rate is 28.00% vs. 30.50% and safe-proceed recall is 70.53% vs. 72.63%, neither improved, with wide bootstrap intervals (Table 13). The authors state this supports transfer of the decision core, but not yet transfer of the full structured pipeline.
- Premise extraction OOD (Table 9, 160 candidates per stratum): the deployed Union+CF extractor achieves critical recall of 95.91%, 92.45%, 94.97% on unseen tool families, unseen domain schemas, and unstructured language, with Gate harmful of 8.23%, 15.19%, 10.13%; on unstructured language, dependency accuracy drops to 61.92%, and safe-proceed recall is 100% in all four strata.
Failure Attribution (RQ5)
- On ToolSandbox, AMV-Guard's Unsafe Pass and Gate harmful are both 0%, but end-to-end raw harm including planning/intent failures is 7.03%; 6.25% of episodes have initial candidates with action/intent errors, 31.83% of Gate-evaluable instances are resolved after feedback without a Gate-approved execution, and 25.00% trigger replanning (Table 12).
- On AppWorld, 7.89% Gate harmful remains (15.79% Unsafe Pass); the authors note that gate-local metrics and end-to-end metrics do not necessarily move in the same direction.
Other Ablations and Analyses
- Operating point sweep (Figures 3, 4, Appendix E): 37 parameter settings, 23,680 full episodes; at operating points with safety δ ≤ 0.5, Gate harmful is 0%, coverage ranges from 0% to 46.50%, and average verification calls range from 0 to 1.153.
- Calibration data efficiency (Table 8): with 10% fitting data, safe-proceed recall drops to 86.00% and Gate harmful is 3.40%; with 25%, recall remains 86.00% but Gate harmful is 0%.
- Extractor variants (Table 9): Graph-only achieves critical recall of only 12.58% on unseen tool families and unseen domain schemas; on unstructured language, Graph-only is 0 throughout.
- Computational cost (Appendix B): one-step selection requires O(mk) posterior stopping-value evaluations, two-step fallback at most O(m2k2), activated only when all one-step scores are non-positive.
What are some points that can be further explored?
The authors list limitations including precondition extraction, bounded planning, and the observation model; experiments cover two simulated environments and three backbone models.
Limitations noted by the authors and future directions
- Precondition extraction partially depends on the model (Limitations): The counterfactual procedure can only filter already-proposed preconditions and cannot recover preconditions that were never proposed; extractor recall constitutes an upper bound on the entire pipeline.
- The deployed planner is a bounded approximation (Limitations): It prefers any positive one-step VOI and invokes the depth-two fallback only when there is no positive one-step query; it need not match a full exact planner on longer complementary sequences.
- The observation model is an approximation (Limitations): ToolSandbox uses binary support/refute observations; a verifier covering multiple preconditions produces only one shared binary observation, and the likelihood uses the mean of the error probabilities of the covered memories, which is an approximation rather than an exact joint observation model.
- The risk engine does not enforce conjunctive hyperedge semantics (Limitations): Joint preconditions are coupled through one shared latent variable, and any loss group failing is charged; multiple distinct joint hyperedges cannot be represented within one candidate, and exact conjunctive loss is listed as future work.
- The loss function depends on executable consequence signals or an explicit policy (Limitations): When neither is available, the asymmetry must be provided manually; the simulator does not cover reputational damage, downstream human costs, or latency effects, and the reported harm rates are harm only over modeled consequences.
- Unreported breakdowns and scalability (Limitations): Breakdowns by perturbation family and by action category, as well as scalability in the number of preconditions, number of verifiers, and dependency depth, have not been reported; the conclusion states that richer multi-precondition dependency structures, longer verification sequences, and full cross-environment transfer remain to be validated.
Scope of experimental coverage
- The backbone models tested are Qwen3.5-35B-A3B, Qwen3.5-27B, and DeepSeek-V4.1-Flash, 3 in total, all called through hosted APIs, with no local training or fine-tuning (Appendix I).
- The environments are ToolSandbox (3,520 instances, 3 observation seeds for the main test) and AppWorld (100 tasks, 200 episodes, only the transfer stopping/VOI core, excluding the precondition extractor, multi-verifier selection, and two-step fallback).
- Defense/policy evaluations include Always Proceed, Always Verify, an adapted EnvProbe, CTA, AMV-Static, and an exact planning reference; all environment content, user instructions, and tool outputs are in English (Appendix H).
- Harm and success are measured by environment-native state evaluators, with no language model review; the paper reports no human evaluation or reviewer agreement.
- The paper reports no breakdown of results by perturbation family or by action category, nor scalability measurements in the number of preconditions, number of verifiers, or dependency depth (stated in Limitations).
Summarize the main content of the paper
The authors propose action-conditioned memory verification and the AMV-Guard gate, which on ToolSandbox reduces verification cost by 33.9% while maintaining zero Gate harm.
A defense paper on long-horizon agent memory safety: whether memory should be re-checked before use is not determined by the memory itself, but by the action about to be executed and the cost of its failure.
- Problem: Cross-session agents execute irreversible actions based on persistent memory, and stale memory directly turns into harm; the authors argue that existing memory-centric methods and action-independent verification scores cannot distinguish the verification needs of "mailing a document to the same address" from "mailing a high-priced item."
- Method: The authors formalize action-conditioned memory verification (AMV) as a sequential stopping problem with an ABSTAIN termination decision, prove that for a fixed action the expected loss does not decrease with observations under Bayesian updating, and that the value of information comes only from changing decisions; on this basis they build AMV-Guard—extracting preconditions of candidate actions, calibrating memory error probabilities, selecting verification by bounded VOI (one-step greedy plus two-step fallback), re-deciding after each observation, and falling back to replanning when the posterior of a precondition violation reaches a threshold.
- Main results: On ToolSandbox (Qwen3.5-35B-A3B backbone), AMV-Guard reduces verification cost by 33.9% relative to the static policy, both maintain 100% safe-proceed recall and 0% Gate harmful, and Proceed coverage rises from 38.83% to 44.17% (Table 1).
- Mechanism evidence: When memory is fixed and only the action is changed, high-risk actions are verified 100% of the time and low-risk actions are executed directly 100% of the time; when only the loss is scaled, the verification rate rises from 0% to 62.8%, high-loss harmful-proceed is 0%, while the version without loss conditioning is 64.2% (Table 6, 7).
- Transfer and boundaries: In the AppWorld gate-core transfer, verification cost drops by 21.28%, but task success rate (28.00% vs. 30.50%) and safe-proceed recall (70.53% vs. 72.63%) decrease slightly; on the DeepSeek-V4.1-Flash backbone, coverage and task success rate also decrease.
- Authors' conclusion: Verification investment should be determined by what the agent is about to do, not merely by how reliable the memory appears; richer dependency structures, longer verification sequences, and full cross-environment transfer remain to be validated.