[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-82953-en":3,"doc-seo-82953-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},82953,1099514068035,"Ezra","https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c",8,"Research & Report","PatchOptic for Shared-State LLM Workflows with Projected Views and Verified Structured Updates","Agentic workflows operate over shared, structured state, but limited LLM context typically relies on progressive disclosure where each invocation sees only the fragment relevant to the current step. Existing view methods manage reading, yet they do not specify when a local rewrite remains globally valid after being applied back to the full state. PatchOptic introduces an optic-inspired step contract using projected reads and verifier-checked structured patches. It enables delegation, sub-workflow composition, and static certificates, and PatchBench results show reduced leakage and token cost while maintaining output quality.","arXiv :2607 .05483v 1 [ cs .LG] 6 Jul 2026  \nPatchOptic for Shared-State LLM Workflows with Projected Views  \nand Verified Structured Updates  \nZhaoyu Bai*1 and Jiaqi Cai∗2  \n1 Department of Particle Physics and Astrophysics, Weizmann Institute of Science, Rehovot, Israel, 7610001  \n2 Department of Physics, Massachusetts Institute of Technology, Cambridge, MA, USA, 02139  \n2026-06-30  \nAbstract  \nAgentic workflows often operate over shared, structured state [1–3] . Because LLM context windows are limited, each model invocation is typically shown only the state fragment needed for the current workflow step, a pattern commonly known as progressive disclosure. Modern systems construct such model-facing views using grep-like keyword search, retrieval-augmented generation (RAG), abstract-syntax-tree (AST) queries, and task-specific agent skills. These methods make the read side manageable, but they do not define when a locally proposed rewrite is valid after it is applied back to the full state. The missing piece is a contract between local updates and global validity. We introduce PatchOptic, an optic-inspired interface for shared-state LLM workflows. Optics are compositional bidirectional accessors that describe how views of structured data are read and updated. PatchOptic borrows this view/update intuition and realizes it through projected reads and verified structured patches. Each workflow step declares a projected read view, an authorized write region, and a patch-source region. The actor sees only the projected view, while the verifier checks each proposed patch against the full state before commit. Beyond runtime enforcement, the same declaration yields a path-level footprint that supports delegation, sub-workflow composition, and static certificates for reordering independent steps within the same phase. We evaluate this design with PatchBench, a benchmark with  \n46 cases across domains. The results show that projected reads reduce reported leakage and token cost while preserving accepted-output quality under the strong actor. Runtime verification blocks declared workflow-contract violations before commit, and patch-read enforcement rejects compromised patch artifacts that use hidden sources. Together, these results pave the way for safely using LLM workflow agents in large shared-state systems, where local actions can be composed, delegated, and verified through explicit workflow footprints.  \n1 Introduction  \nProgressive disclosure is now common in agentic workflows. Because LLM context windows are limited, systems typically expose to each model invocation only the fragment of the full state needed for the current step. For example, RAG retrieves relevant corpus passages, agent skills provide task-specific tools and instructions, and syntax-aware AST queries expose relevant code structure. These techniques make the read side manageable [4–9] . The write side is less settled. In a multi-step  \n∗ Corresponding authors’ emails: [jiaqic@mit.edu](jiaqic@mit.edu) ; [zhaoyu.bai@weizmann.ac.il](zhaoyu.bai@weizmann.ac.il)  \nworkflow over shared structured state [1–3], an agent often proposes an update based only on the fragment it was shown. With only that fragment, the agent may miss how the proposed write relates to the rest of the state, including dependencies, schema, phase, references, and permissions. Judging global validity from this local view places a heavy cognitive burden on the agent. Recent agent benchmarks evaluate this multi-step stateful regime [7, 10–13] . Prompt-injection work studies a related class of failures in which untrusted context affects agent behavior [14–16] .  \nExisting controls cover only parts of this problem. Schema validators can check output structure and some local value constraints, but they do not by themselves establish that the values are semantically correct or derived from authorized state [17] . Constrained decoding can restrict the syntax of the generated string, but it does not verify ","cbCaieJ5WzWHR4vB","https://ap.wps.com/l/cbCaieJ5WzWHR4vB","pdf",579767,2,1,24,"English","en",105,"# Introduction\n## Progressive disclosure and local vs global validity\n## Limits of existing controls\n## PatchOptic: projected reads and verified patches\n## Runtime and static footprints\n# Contributions","[{\"question\":\"What problem does PatchOptic address in shared-state LLM workflows?\",\"answer\":\"PatchOptic addresses the gap between local updates proposed from a limited state fragment and the need to guarantee that those updates are globally valid against the full shared state before commit.\"},{\"question\":\"How does PatchOptic enforce correctness at runtime?\",\"answer\":\"Each step provides the actor only a projected read view, then a verifier checks the model’s proposed structured patch against the full state before committing the update.\"},{\"question\":\"What benefits do the PatchOptic step footprints provide beyond runtime enforcement?\",\"answer\":\"Footprints support delegation and sub-workflow composition, and enable static commutation checks when independent steps have disjoint writes and non-overlapping read dependencies.\"}]",1784184302,60,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"patchoptic-for-shared-state-llm-workflows-with-projected-views-and-verified-structured-updates","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,47,50],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":20},"https://docshare.wps.com/document/","Document",{"item":48,"name":12,"@type":43,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/patchoptic-for-shared-state-llm-workflows-with-projected-views-and-verified-structured-updates/82953/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":24,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-23","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does PatchOptic address in shared-state LLM workflows?","Question",{"text":75,"@type":76},"PatchOptic addresses the gap between local updates proposed from a limited state fragment and the need to guarantee that those updates are globally valid against the full shared state before commit.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does PatchOptic enforce correctness at runtime?",{"text":80,"@type":76},"Each step provides the actor only a projected read view, then a verifier checks the model’s proposed structured patch against the full state before committing the update.",{"name":82,"@type":73,"acceptedAnswer":83},"What benefits do the PatchOptic step footprints provide beyond runtime enforcement?",{"text":84,"@type":76},"Footprints support delegation and sub-workflow composition, and enable static commutation checks when independent steps have disjoint writes and non-overlapping read dependencies.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":92},[93,97,101,105,109,114,119,122,127,130,134],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":20,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":29,"slug":108},5,"Comic","comic",{"id":110,"doc_module":4,"doc_module_name":46,"category_name":111,"show_sort_weight":112,"slug":113},6,"Technology",50,"technology",{"id":115,"doc_module":4,"doc_module_name":46,"category_name":116,"show_sort_weight":117,"slug":118},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":120,"slug":121},30,"research-report",{"id":123,"doc_module":4,"doc_module_name":46,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":46,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":46,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":46,"category_name":136,"show_sort_weight":106,"slug":137},19,"General","general"]