Skip to content

Pincer: Learning User Preferences with a Digital Twin and Enforcing Dynamic Least PrivilegePincer: Resource Authorization for Agents using a Digital Twin

Paper Tracker· arXiv:2610.02569· Mayank Rathee, Alexander Stepanov, Shalin Madabhavi, Jinhao Zhu, Raluca Ada Popa, Ion Stoica·Indexed by this site · 2026-10-05· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

Pincer authorizes at the resource layer: cASR is 28.4% for Software Dev and 8.1% for Litigator (Table 2).

Threat modelAn attacker can arbitrarily compromise the worker, third-party tools, and resource names and contents; cannot modify system code or model weights, nor manipulate user-to-system or twin-to-model-provider channels. The TCB includes the twin LLM and its inference stack, the resource request tool, write isolation of twin state, the OS kernel, and the container runtime. The user is a trusted party and their decisions are assumed safe. The goal is resource-layer grant integrity.

Questions
In deployment, coding agents rely on user-maintained sandboxes and tool-call classifiers. Policies suffer from permission creep, and repeated confirmations cause authorization fatigue; classifiers do not learn user policies and allow unsafe operations under adversarial traffic. Pincer aims to provide user-specific least-privilege authorization at the resource layer and coexist with existing tool-call defenses.
Methods
The system places an isolated digital twin between tools and resources. It only accumulates user prompts and approved permissions, and authorizes after replacing path segments with PRF. The decision is a three-vote conjunction: trusted and advantage-agnostic context, a vote including resource content, and a pre-commitment policy at session start.
Experiments and results
On Software Dev (Haiku 4.5) and Litigator (Muse Spark 1.2), Pincer's cASR in Table 2 is 28.4% and 8.1%, lower than each baseline; cBGR is 89.7% and 90.9%, lower than most baselines. The authors state it is stronger than all baselines on PL attacks.
Limitations and future work
The paper does not specifically discuss limitations. Evaluation uses two personas, one model each, file system resources, 66 and 72 safety samples, 81 and 80 utility samples, with each setting run twice. Variance, statistical tests, and exact readings for each attack type bar in Figure 5 are not reported.
Experimental setupClaude Haiku 4.5、Muse Spark 1.2 Contributor · Software Dev persona corpus、Litigator persona corpus · ASR、cASR et al.
Evaluated models
Claude Haiku 4.5Muse Spark 1.2 Contributor
Benchmarks
Software Dev persona corpusLitigator persona corpus
Metrics
ASRcASRBGRcBGR
AI summaryThe researchers propose Pincer, an agent defense that operates at the resource layer and can run in parallel with existing defenses at the tool-call layer. Its core is a digital twin, an isolated-context model that automatically learns and enforces dynamic least-privilege policies specific to the user, acting as a user proxy when the agent makes permission requests. To simulate the learning phase, the authors construct a user-centric dataset with samples from multi-day user-agent interaction logs. Evaluation shows that Pincer outperforms multiple baselines in both safety and utility, including various LLM judge variants and a modified version of Conseca (HotOS '25); on some attack types, the safety improvement from its design is significantly higher than all other baselines. The paper notes that current deployed agents like Claude and Codex primarily rely on user-maintained policies and auto-mode sandboxes; the former degrade over time and cause user fatigue, while the latter's tool-call classifiers do not learn user-specific policies.

The researchers propose Pincer, an agent defense that operates at the resource layer and can run in parallel with existing defenses at the tool-call layer. Its core is a digital twin, an isolated-context model that automatically learns and enforces dynamic least-privilege policies specific to the user, acting as a user proxy when the agent makes permission requests. To simulate the learning phase, the authors construct a user-centric dataset with samples from multi-day user-agent interaction logs. Evaluation shows that Pincer outperforms multiple baselines in both safety and utility, including various LLM judge variants and a modified version of Conseca (HotOS '25); on some attack types, the safety improvement from its design is significantly higher than all other baselines. The paper notes that current deployed agents like Claude and Codex primarily rely on user-maintained policies and auto-mode sandboxes; the former degrade over time and cause user fatigue, while the latter's tool-call classifiers do not learn user-specific policies.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Using digital twins at the resource layer to grant least-privilege permissions based on user history, mitigating permission creep and adversarial failure of tool-call classifiers.

    Deployed coding agents need user-specific least-privilege control over resource access while retaining general-purpose shells and persistent memory.

    • Scenario: The authors state that such agents are long-horizon, autonomous, and maintain memory. Deployed systems (e.g., Claude, Codex) mainly rely on user-maintained sandboxes and tool-call classifiers like auto mode. Policies widen as authorizations accumulate, and repeated confirmations cause authorization fatigue; classifiers do not learn user policies. The authors cite stress tests claiming auto mode allows most unsafe operations.
    • Shortcomings: The authors state that strong defenses (typed tools, information flow, policy prediction) remove core capabilities of existing architectures, making adoption difficult. They claim that arbitrary tool-call classifiers struggle to reason about code or complex shell effects, and dangerous operations can be hidden in innocuous file names or dependency chains. Auto mode also does not address permission creep; users still have to manually edit policies.
    • Approach: Pincer is added at the resource layer, coexisting with auto mode. The digital twin uses isolated context, learns dynamic user-specific least privilege from user history, and handles requests on behalf of the user. The authors also create a multi-day user-centric synthetic dataset to simulate learning, and claim it is the first such dataset to their knowledge.
    • Threat Model:
      • Goal: Resource-layer grant integrity: if authorized, then authorization would also occur with only trusted and advantage-agnostic context. The authors state they do not aim to block all attacks.
      • Capabilities: Can arbitrarily compromise the worker, third-party tools, and resource names and contents; cannot modify system code or behavior, and does not control model weights.
      • Channels: Cannot manipulate user-to-system or twin-to-model-provider communication.
      • TCB: Twin LLM and inference stack, resource request tool, write isolation of twin state, OS kernel and container runtime. Worker and shell are not in the TCB. The user is trusted and decisions are assumed safe; hallucination is not considered untrustworthy.
  2. What related research exists?

    Related work covers agent attacks, defenses with restrictive architectures, least-privilege policies, and episodic safety benchmarks.

    Agent attacks

    • Three types of injection: The authors classify attacks into direct prompt injection (DPI), indirect prompt injection (IPI), and memory poisoning. DPI is in user messages; IPI enters the context through tool returns; memory poisoning writes into the memory the agent maintains for self-improvement and can be activated across sessions. The authors state that the implant includes both DPI disguised as a user and what they consider the more realistic IPI: reading poisoned content from the environment while executing a benign request.
    • Finer classification: Other work classifies coding agents by skills, tools, and protocols. The paper only reports that this classification exists.

    System-level defenses

    • Restrictive architectures: The authors discuss separating control flow from untrusted data or trusted planners, information flow over typed tools, forbidding memory maintained by encountered context, and one LLM per tool. The authors state this would disable benign context-dependent control, untyped shells, or self-improvement, and does not combine well with the deployed architecture in Figure 1; one model per tool still suffers from several attacks and has inter-tool communication overhead.
    • Prompt hardening: Spotlighting and detection of suspicious fragments in context and memory are called complementary by the authors, but adaptive attacks can bypass them. The authors state that the extra token cost of proactive detection and the lack of robustness against strong attacks make them unsuitable for several applications.
    • Least privilege: Policies are given by the user or externally, or predicted in advance when the prompt arrives (Conseca), or evolve during the task but the engine lacks working context. The authors state that the latter two underfit long-horizon open-ended tasks; most schemes rely on structured tools and are limited in expressiveness on untyped shells. Typed, OAuth-style APIs can use least-privilege solvers.

    Model-level, permission prediction, and benchmarks

    • Instruction hierarchy: Fine-tuning to understand instruction hierarchy and ignore instructions conflicting with user intent. The authors state that reliability remains problematic, and multi-turn and agent behavior are outside the scope of these works; other work traces the difficulty to role awareness. The authors state that model-level defenses are complementary to this paper. Fine-tuning to disobey in-data instructions, the authors state, is inapplicable to agents that must execute in-data instructions.
    • Historical permissions: Wu et al. use past permissions to predict the next one. Pincer relies on the same premise: decisions are consistent within the same context and thus learnable. The authors state that its scope excludes computer-use agents because decisions depend more on context and the resources themselves are untrusted.
    • Benchmarks and terminology: The authors state that existing agent safety benchmarks are episodic and unsuitable for evaluating a single user's interactions over time. Multi-session memory benchmarks do not evaluate safety. SMP has multi-session memory poisoning data, but the authors state it is not a complete dataset evaluating both safety and utility simultaneously, and lacks long user-centric records. The authors use digital twin to distinguish memory affected only by the user from agent memory that can evolve from untrusted environments.
    • Baselines: NanoClaw without resource gating; Static-Judge without history; Dynamic-Judge with full history but local state that can be affected by untrusted context; Conseca+ adapting Conseca (HotOS '25) to the resource layer and executing pre-commitment policies with regex; Conseca-Gemini+ using an LLM judge without looking at file contents. The data are two persona corpora, with safety samples referencing SMP and PASB.
    • Positioning: The authors state that policies are fitted when needs arise rather than predicted in advance; enforcement is at the resource layer so it can be combined with auto mode; the twin's inputs are limited to trusted and advantage-agnostic contexts.
  3. How does the paper address this problem?

    The digital twin votes on safety only from trusted and advantage-agnostic context, then conjoins with content votes and pre-commitment policy votes.

    Pincer adds a resource-layer defense to existing agents: every resource access goes through a reference monitor, and only the isolated twin can authorize, deciding based on least privilege whether the access is needed to complete the user's task.

    Components and Request Path

    • Four types of components: Two LLMs, worker and twin; their dedicated states; tools used by the worker, including a resource request tool to the twin; resources such as files, email, web.
    • Flow: The user prompt enters both worker and twin states. When a tool accesses an unauthorized resource, it submits the resource identity and access type (read, write, create, etc.) via a narrow channel. The tool can only access after the twin authorizes; Figure 3 states revocation after task completion. A footnote states that an authorization remains valid during that task.
    • Escalation to user: Only when the twin repeatedly rejects requests that the worker genuinely needs is it escalated to the user for final review.
    • Relation to tool-call layer: Resource decisions target a single named object and fixed access pattern, a smaller space than commands. The authors state it is coarser, e.g., it cannot see whether an already-accessed file is overwritten by another accessed file, so it should be stacked with defenses like auto mode in deployment.

    Trusted State, Access Patterns, and Sanitization

    • Trusted state: Contains only content directly produced by trusted parties: current and historical user prompts, and permissions previously approved by the user. The twin can write user-specific policies from this, deleting outdated or inconsistent policies. The authors state in Section 3 that with only trusted context, decisions cannot be better than a coin flip because requests come from a potentially compromised worker.
    • Access patterns: To form least privilege, access annotations from tool logs are attached to each user prompt; accesses approved by the twin are also written to its state. Except for the pre-commitment policy below, derived policies do not enforce a fixed format and use natural language to generalize to open scenarios.
    • Misleading resource names: The authors describe an attack in Section 5.3 where resource names or locations are crafted to match existing access patterns, causing the worker and twin to treat them as objects the task should access. The paper does not present specific renaming steps as a recommended procedure.
    • Sanitization: For untrusted access annotations and request paths, path segments are replaced with PRF where the decision process does not know the key; same-directory segments share prefixes to allow comparison with historical requests, but name semantics are removed. The authors implement this as advantage-agnostic context in Definition 4: any PPT decision process has negligible advantage between real preprocessing and random function replacement. The authors state that hashing does not satisfy this definition because hashes of common words may have been seen in pretraining; inodes may have similar effects when the decision maker is an LLM.

    Three-Vote Conjunction and Pre-commitment Policy

    • Vote 1: Reads only trusted context and sanitized access patterns and resource names. The authors state this is the security backbone; without isolation of this vote, guarantees cannot be established.
    • Vote 2: Additionally sees the content of the requested resource, the worker's reasoning, and previous requests in the same session. Content policies (e.g., files containing secrets are unreadable) cannot otherwise be enforced. Under conjunction, this vote only changes the outcome when Vote 1 has already authorized. The authors state that untrusted content may still gradually expand the task scope.
    • Vote 3: When the first user prompt of the session arrives, before scope expansion, the twin generates a pre-commitment policy based on the prompt, workspace, file names, trusted state, and access patterns, with the pattern in Listing 1: pathGlob, access, operations, permission (allow, deny, ask_user), rationale shown only with untrusted content, and default deny for uncovered requests. The policy is sanitized after generation and aligned with sanitized requests. The authors state that sanitizing after generation does not block resource name attacks because the names entering the policy already depend on unsanitized names, so it is not merged into Vote 1. They state that generating on unsanitized context preserves additional signals and reduces attack success from 40% to 20%; the persona, model, and attack type for this comparison are not specified in the paper.
    • Two variants: The final decision is a three-vote conjunction, with authorization as 1 and denial as 0. Pincer's Vote 2 does not see the pre-commitment policy; Pincer-P2 does. The authors state that utility remains high after conjunction, with numbers in Question 4.

    Guarantees and Implementation Boundaries

    • Goal 1: If Pincer authorizes, then authorization would also occur with only trusted and advantage-agnostic context. Written as D(tctx, actx, uctx; r)=grant⇒ LLM(tctx, actx; r)=grant. On the same random tape, the right side is the pretrained model; a footnote states this excludes always-grant or always-deny.
    • Theorem 1: The authors state that Pincer satisfies Goal 1 at the resource layer. The proof is that conjunction implies Vote 1 is grant, and Vote 1 reads only those two contexts. Denial can come from Votes 2 or 3, but the one-way implication still holds.
    • Implementation: Built on NanoClaw. Worker and tools are in containers, resources are bind-mounted from the host. Worker uses unprivileged UIDs, and the kernel checks mode bits and POSIX ACLs; no user-namespace remapping, so the UID is also the host UID. Containers are destroyed after each task. The authors state that no matter how the worker accesses, it cannot bypass kernel checks.
    • Scope: This paper focuses on the file system. For web APIs and cloud resources, the authors state that capability-based access control can be used, without implementation details.
  4. What experiments did the paper conduct?

    On both personas, Pincer's cASR is lower than the table's baselines, while its cBGR is lower than most baselines (Table 2).

    Experimental setup

    • Platform and baselines: All are built on NanoClaw. NanoClaw has no resource gating; the worker can access mounted workspaces within the container. Other baselines give the worker resource request tools, starting with only file names and paths. Static-Judge has general safety instructions, looks at file content, file names, and reasons, with no history. Dynamic-Judge receives full history, and its local state can be directly influenced by untrusted context. Conseca+ generates a Listing 1-style policy from the prompt, workspace tree, and full history when the prompt arrives, then does regex matching. Conseca-Gemini+ similarly receives the policy, but execution is by an LLM judge, looking at file names and reasons, not file content.
    • Models: For Software Dev, the worker, LLM judge, and twin are all Claude Haiku 4.5. Litigator uses Muse Spark 1.2 Contributor; the paper does not further break down its roles. Data is synthesized by Claude Opus 4.8 and Opus 5. This is not a transfer setting; there is no separate shadow model. The authors write that due to resource constraints, only one model was evaluated per persona.
    • Data: Two persona corpora (Table 1). Software Dev: workspace files 33, projects 2, history prompts 40, user policies 33, safety samples 66, utility samples 81. Litigator: 95, 5, 60, 33, 72, 80. History comes from user simulation, used for twin learning; test samples are temporally later than the historyched, and need not only repeat historical tasks. The assumption is the worker is attacker-controlled; what is being evaluated is the authorization side.
    • Attack types: DI puts payloads in the request reason; II has payloads outside the request string, such as file content or file names; MP gets the judge to write fabricated authorizations into its own state, with samples split into direct and indirect; misleading file names are split into content and name mismatches (CL) and position, name disguised as another location (PL). Table 1's DI/II/MP/CL/PL: Software Dev is 10/25/9/14/8, Litigator is 7/40/9/11/5.
    • Metrics: ASR is the percentage of attack samples where the worker accesses the forbidden monitored resource, lower is better. cASR is computed only on samples where the worker actually requested that resource. BGR, cBGR are the percentages of utility samples where benign monitored resources are accessed, higher is better. The determination is whether the system had such access, not a separate harm review.
    • Replication: Figure 4's caption states each setting was run twice. Table 2 does not state whether these percentages are averages of the two runs, nor gives per-run results.

    Main results

    The text does not give coordinates for Figure 4 points; the main table uses only Table 2's conditional rates (%). Software Dev corresponds to Haiku 4.5, Litigator to Muse Spark 1.2 Contributor.

    Swipe horizontally to read the table

    MethodSD cASRSD cBGRLit cASRLit cBGR
    NanoClaw93.272.841.095.6
    Static-Judge48.998.130.993.7
    Dynamic-Judge61.998.132.696.2
    Conseca+63.591.316.098.1
    Conseca-Gemini+59.894.818.296.9
    Pincer28.489.78.190.9
    Pincer-P232.292.99.789.5
    • The authors state that in Figure 4, Pincer's safety has a jump and utility is comparable to baselines, and Table 2's conditional rates match this trend. In the table, Pincer's cASR is lower in both columns than other rows in the same column.
    • The authors state utility is high; in the same table, on cBGR, Pincer is lower than the two judges and the two Conseca variants. On Software Dev it is only higher than NanoClaw; on Litigator, only higher than Pincer-P2.
    • Pincer-P2's cASR is higher than Pincer's in both columns. The paper does not explain this difference.

    Per attack type

    • What was measured: Figure 5 breaks ASR by DI, II, MP, CL, PL. Solid bars are ASR, and the wider light bars behind are cASR; NanoClaw has no gating, so its cASR is omitted. The text does not give per-bar readings.
    • Authors' interpretation: Across attack types, Pincer outperforms most baselines. The improvement relative to Dynamic-Judge is larger for MP, which the authors attribute to the latter's lack of state isolation. On PL, the authors state that protection is stronger than all baselines for both model families and both personas.
    • Sample sizes: Several types have n≤20; the denominators are Table 1's 10/25/9/14/8 and 7/40/9/11/5. There are no per-type success counts, so per-type ASR cannot be reconstructed from the text.

    Cost

    • Relative multiples: The authors state that baseline token costs are roughly 2-5 times that of undefended NanoClaw, and Pincer adds another 2-3 times on top. The paper does not give absolute token counts, nor does it break the multiples down by persona or model.
    • Authors' stated source: The authors state that about half of Pincer's cost comes from the twin's reasoning tokens, because the implementation has not yet compressed state into standing policies; each request reasons over the entire state from scratch. The resource request tool is also not batched; multiple resources need separate requests, each reasoning from scratch.
    • Untested cost reductions: The authors write that mature tasks could be pre-approved like Conseca+ and executed with path matching. The paper does not report measured costs after compression, batching, or pre-approval.

    Other ablations and analyses

    • Whether vote 2 receives the pre-commitment policy: this is the Pincer vs. Pincer-P2 comparison in the main table, with no separate table.
    • Section 5.6: generating policies on unsanitized context versus on sanitized versions; the authors state the attack success rate goes from 40% to 20%. Personas, models, attack types, and sample sizes are not specified. This is not a comparison of Pincer and Pincer-P2.
    • The paper does not report temperature, thresholds other than vote counts, number of queries, or human agreement. Success is determined by whether the monitored resource is accessed.
  5. What are some points that can be further explored?

    The paper does not have a dedicated Limitations or Future Work section.

    Limitations and Future Directions Noted by the Authors

    The paper does not have dedicated Limitations, Discussion, Conclusion, Future Work, or appendix sections to specifically address limitations. Section 3 has non-goals: not aiming to block all attacks, and hallucination is not considered untrustworthy; these statements are not in the aforementioned dedicated sections.

    Experimental Coverage

    • The defense is built on NanoClaw, with baselines being NanoClaw, Static-Judge, Dynamic-Judge, Conseca+, Conseca-Gemini+, Pincer, Pincer-P2 (Sections 7.1–7.2).
    • Evaluation models are Claude Haiku 4.5 (worker, LLM judge, and twin for Software Dev) and Muse Spark 1.2 Contributor (Litigator persona). The authors state in Section 7.2 that due to resource constraints, one model is used per persona. Synthetic data uses Claude Opus 4.8 and Opus 5.
    • Corpus sizes are in Table 1: 66 and 72 safety samples, 81 and 80 utility samples; attack types are DI, II, MP, CL, PL. Figure 4 caption states each setting is run twice. Metrics are ASR, cASR, BGR, cBGR, determined by whether monitored resources are accessed.
    • Implementation and evaluation focus on the file system, using unprivileged UIDs, mode bits, and POSIX ACLs (Section 7.1). The authors state that web APIs and cloud resources can use capability-based access control; the paper does not report numbers on these resources.
    • The paper does not report separate results or variances for the two runs, statistical tests, absolute token counts, or exact readings for each bar in Figure 5. The 40% and 20% in Section 5.6 do not specify the model, persona, or attack type. The authors plan to release the implementation and dataset, but the main text does not state that they have been released.
  6. Summarize the main content of the paper

    Pincer authorizes at the resource layer with a three-vote conjunction; cASR for the two personas is 28.4% and 8.1%, with cBGR mostly lower.

    Pincer is a resource-layer authorization defense added on top of an off-the-shelf coding agent: it uses a digital twin influenced only by user-side information to perform dynamic least privilege, and coexists with tool-call layer defenses.

    It addresses privilege creep and authorization fatigue caused by user-maintained policies, as well as tool-call classifiers that do not learn user policies. The authors cite work stating that auto mode allows most unsafe operations through, and argue that reasoning code or complex shell effects are impractical at this layer. The authors state the goal is to raise the attack bar and provide defense in depth, not to create an unbreachable agent.

    The twin's state accumulates only user prompts and user-approved permissions; untrusted segments like paths are replaced with PRF outputs on a per-segment basis. Authorization is a three-vote conjunction: looking only at trusted and advantage-agnostic context, then at resource content and request reasons, and then at the pre-commitment policy at session start. Theorem 1 states that the resource layer satisfies grant integrity: a conjunction authorization implies the first vote would also authorize. The implementation is built on NanoClaw, with kernel ACL mediating file system access. The learning phase uses synthetic multi-day user records for simulation; the authors claim this is, to their knowledge, the first such dataset.

    • The evaluation assumes the worker has been compromised. Software Dev uses Claude Haiku 4.5, Litigator uses Muse Spark 1.2 Contributor, and each setting is run twice.
    • In Table 2, Pincer's cASR is 28.4% (Software Dev) and 8.1% (Litigator), both columns lower than NanoClaw, the two LLM judges, and the two Conseca variants. cBGR is 89.7% and 90.9%, lower than most baselines.
    • The authors state that in Figure 4, safety has a jump and utility is comparable, and conditional rates align with this trend. In Figure 5, the authors state that PL protection is stronger than all baselines, and MP is more prominent relative to Dynamic-Judge without state isolation; the main text does not give per-bar readings.
    • The authors state that baseline token costs are roughly 2-5 times that of undefended NanoClaw, and Pincer adds another 2-3 times on top. The authors plan to release the implementation and dataset.

    The authors' conclusion is that fitting user policies at the resource layer when needs arise can be stacked with existing agent architectures and tool-call defenses, and use isolated context to write "untrusted content cannot alone flip into authorization" as grant integrity. Regarding utility, they state it is comparable to baselines and remains high after conjunction; Table 2's cBGR is not higher than most baselines.

Read originalarxiv.org