<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shashank Shekhar</title>
    <description>The latest articles on DEV Community by Shashank Shekhar (@shkr).</description>
    <link>https://dev.to/shkr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1279789%2Fc24e2e42-fbed-4e7b-af45-842b178d0a04.jpeg</url>
      <title>DEV Community: Shashank Shekhar</title>
      <link>https://dev.to/shkr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shkr"/>
    <language>en</language>
    <item>
      <title>Where should your agent keep its work between sessions?</title>
      <dc:creator>Shashank Shekhar</dc:creator>
      <pubDate>Mon, 16 Nov 2026 05:59:48 +0000</pubDate>
      <link>https://dev.to/shkr/where-should-your-agent-keep-its-work-between-sessions-277a</link>
      <guid>https://dev.to/shkr/where-should-your-agent-keep-its-work-between-sessions-277a</guid>
      <description>&lt;p&gt;My agents kept losing their work. A session would build a tracker, a ledger or a report. The next session could not find it. Sometimes it found an old copy and wrote over a newer one.&lt;/p&gt;

&lt;p&gt;The model was not the problem. The problem was where the work lived. A chat transcript ends with the session. A folder of markdown files has no versions, no checks and no idea who else is editing it.&lt;/p&gt;

&lt;p&gt;So I gave my agents a system of record. It is a remote MCP server, and the agent keeps its work there in &lt;strong&gt;workbooks&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a workbook?
&lt;/h2&gt;

&lt;p&gt;A workbook is a set of tabs. Each tab is markdown: a table, or a page of notes. A workbook can also be an Excel or Word file, or a sheet linked to Google Drive or Dropbox. In that case the file in the drive stays the record.&lt;/p&gt;

&lt;p&gt;Four rules make it safe for an agent to use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Every write is a new version.&lt;/strong&gt; The agent never edits in place. Each write makes version N+1 and keeps version N. Any earlier version can be read or restored.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. A stale write is refused.&lt;/strong&gt; The agent says which version it based its write on. If someone else wrote a newer version since, the write fails. Nothing is merged over. The agent reads the new version and tries again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Edits are checked like code.&lt;/strong&gt; A workbook can carry a schema. It declares each table's columns, types, required cells, keys and references. Every write is compiled against it. A bad cell comes back as an error, the way a compiler answers. The agent fixes the cell and writes again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Everyone reads the same thing.&lt;/strong&gt; Claude, ChatGPT, Codex and Cursor connect to the same server. So does a person in the web app. A workbook one agent writes on Monday is the one another agent reads on Tuesday.&lt;/p&gt;

&lt;h2&gt;
  
  
  A real example
&lt;/h2&gt;

&lt;p&gt;This week I asked Claude Code to plan an outreach pilot. I wanted the plan to be checkable, not just plausible.&lt;/p&gt;

&lt;p&gt;It kept four tabs in one workbook:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model.&lt;/strong&gt; A TLA+ specification of the rules: who may be contacted, how often, and when the pilot may scale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TLC result.&lt;/strong&gt; The model checker's output. Nine safety rules hold across about 41,000 states. One rule was written to break on purpose, and its trace is the shortest path to a decision to scale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simulator.&lt;/strong&gt; A Monte Carlo simulation of the funnel, with the priors written down so they can be replaced after the pilot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ledger.&lt;/strong&gt; Who was contacted, how each address was checked and when each message goes out.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The workbook went through four versions in one afternoon. Each has a one-line summary of what changed. When I wanted to know why the ledger had grown from 14 rows to 50, I read the version history. I did not have to scroll back through a chat.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the agent uses it
&lt;/h2&gt;

&lt;p&gt;The server exposes a small set of tools. The ones an agent uses most are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find_workbooks&lt;/code&gt;: look for the workbook that already exists before making a new one.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;read_workbook&lt;/code&gt;: read the current version, or any earlier one by number.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;write_workbook&lt;/code&gt;: write a new version, based on the version it read.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;checkout_workbook&lt;/code&gt;: copy the tabs into a shell, edit them with scripts, then commit them as one version.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The last one matters for big edits. The agent can use &lt;code&gt;sed&lt;/code&gt;, &lt;code&gt;awk&lt;/code&gt; or Python on plain files and commit once. The schema check still runs on commit.&lt;/p&gt;

&lt;p&gt;The server also has live data programs the agent can run from the same shell. These include Google Trends, SEC Form D filings and US customs records. Their results can go straight into a workbook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;Claude Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add --transport http --scope user hedwigai https://mcp.hedwigai.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run &lt;code&gt;/mcp&lt;/code&gt;, pick hedwigai and authenticate in the browser. Sign-in is OAuth 2.1 with dynamic client registration, so there is no token to paste.&lt;/p&gt;

&lt;p&gt;Codex:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex mcp add hedwigai --url https://mcp.hedwigai.com &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; codex mcp login hedwigai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude, ChatGPT and Cursor: add &lt;code&gt;https://mcp.hedwigai.com&lt;/code&gt; as a custom connector.&lt;/p&gt;

&lt;p&gt;The server is in the official MCP registry as &lt;code&gt;com.hedwigai/hedwigai&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it with your own server
&lt;/h2&gt;

&lt;p&gt;If you build MCP servers, I will turn on two weeks of free inference for your account. Sign up and leave a comment, and I will set it up. After the two weeks, three open models stay free to use as much as you like.&lt;/p&gt;

&lt;p&gt;For a wider view, I compared 24 places agents can save their work, from Tencent's Agent Bucket and Google's ADK artifacts to AWS AgentCore, Claude and OpenAI: &lt;a href="https://www.hedwigai.com/blog/agent-artifact-stores" rel="noopener noreferrer"&gt;where do AI agents save their work?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How does your agent keep its state across sessions today? I would like to hear what works and what breaks.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I build hedwigai.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>agents</category>
      <category>claude</category>
    </item>
  </channel>
</rss>
