<?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: Aditya Goyal</title>
    <description>The latest articles on DEV Community by Aditya Goyal (@adityagoyal009).</description>
    <link>https://dev.to/adityagoyal009</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%2F4151085%2F5b0244d7-5e20-4fe6-a232-e90b1a1d366e.png</url>
      <title>DEV Community: Aditya Goyal</title>
      <link>https://dev.to/adityagoyal009</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adityagoyal009"/>
    <language>en</language>
    <item>
      <title>Local-first AI explained</title>
      <dc:creator>Aditya Goyal</dc:creator>
      <pubDate>Thu, 01 Oct 2026 01:52:01 +0000</pubDate>
      <link>https://dev.to/adityagoyal009/local-first-ai-explained-4993</link>
      <guid>https://dev.to/adityagoyal009/local-first-ai-explained-4993</guid>
      <description>&lt;p&gt;Local-first AI means your own device holds the primary copy of your data, and the AI tool works from that copy, sending out only what a given task needs. It does not have to mean the AI model itself runs on your machine, although it can.&lt;/p&gt;

&lt;p&gt;The term "local-first" comes from software design. A local-first application treats the copy on your device as the real one. The network is used for sync, sharing and backup, not as the only place your work lives. The application keeps working when you are offline, and your files remain readable if the vendor disappears.&lt;/p&gt;

&lt;p&gt;Applied to AI, the same idea raises a useful question: for each part of the tool, where does it run and where does its data rest?&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things that can be local
&lt;/h2&gt;

&lt;p&gt;It helps to separate three layers, because a product can be local in one and not the others.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Your data.&lt;/strong&gt; Notes, documents, code, mail, transcripts. Local-first means these sit on your disk in formats you can open without the tool, such as plain text or Markdown.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your credentials.&lt;/strong&gt; API keys and sign-ins. Local means they sit in the operating system's secret store, not on a vendor's server. See &lt;a href="https://prismlabs.si/blog-where-ai-keys-should-live.html" rel="noopener noreferrer"&gt;where your AI keys and logins should live&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The model.&lt;/strong&gt; The AI that reads the prompt and writes the answer. This may run on your device, or in a provider's data centre.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Many practical setups are local for the first two and remote for the third. That is still a meaningful improvement over a setup where all three live on someone else's servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Local models and remote models
&lt;/h2&gt;

&lt;p&gt;Running a model on your own hardware is possible. Open-weight models can be downloaded and run on a laptop or workstation, and smaller ones run acceptably on ordinary machines.&lt;/p&gt;

&lt;p&gt;The trade-off is capability against hardware. Larger models generally give better answers on hard tasks, and they need a lot of memory and a capable graphics processor or similar accelerator. The strongest models are typically offered only as hosted services. Smaller local models do well on narrower jobs: transcription, classification, summarising short text, searching your own notes.&lt;/p&gt;

&lt;p&gt;So a sensible local-first design is often a mix:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Often runs locally&lt;/th&gt;
&lt;th&gt;Often runs remotely&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Speech-to-text&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Also common&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Search over your own notes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Sometimes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Short summaries and tagging&lt;/td&gt;
&lt;td&gt;Possible&lt;/td&gt;
&lt;td&gt;Common&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long reasoning, large coding tasks&lt;/td&gt;
&lt;td&gt;Rarely&lt;/td&gt;
&lt;td&gt;Usually&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The guide on &lt;a href="https://prismlabs.si/blog-on-device-meeting-transcription.html" rel="noopener noreferrer"&gt;on-device meeting transcription&lt;/a&gt; looks at one of these in detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "only what the task needs" means
&lt;/h2&gt;

&lt;p&gt;When a remote model is involved, something has to leave your device. Local-first design is about keeping that to the minimum and making it visible.&lt;/p&gt;

&lt;p&gt;In a cloud-first tool, your whole workspace may be uploaded and indexed on the vendor's servers so that the AI can search it. In a local-first tool, the index sits on your machine. When you ask a question, the tool finds the relevant passages locally and sends only those, with your question, to the model.&lt;/p&gt;

&lt;p&gt;The difference is between a standing copy of everything and a small, task-sized extract. The guide on &lt;a href="https://prismlabs.si/blog-what-gets-sent-to-an-ai-provider.html" rel="noopener noreferrer"&gt;what gets sent to an AI provider&lt;/a&gt; explains what that extract usually contains.&lt;/p&gt;

&lt;h2&gt;
  
  
  The benefits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fewer custodians.&lt;/strong&gt; If the tool vendor never stores your content, there is one less party to assess, and one less place for a breach to happen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Works offline, at least in part.&lt;/strong&gt; Your notes and files are there without a connection. Anything that needs a remote model will wait.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed for local operations.&lt;/strong&gt; Opening, searching and editing do not wait on a server round trip.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Durability.&lt;/strong&gt; Files in open formats outlive the tool. You can move to another editor or another vendor without an export project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clearer answers to compliance questions.&lt;/strong&gt; "Where is the data?" has a short answer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The costs
&lt;/h2&gt;

&lt;p&gt;Local-first is not free, and it is worth being honest about that.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You are the custodian.&lt;/strong&gt; Backups, disk encryption and lost-laptop plans become your job. A cloud vendor's operations team is no longer covering for you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sync is hard.&lt;/strong&gt; Keeping several devices and several people in step without a central server is a real engineering problem. Techniques such as conflict-free replicated data types exist for this, but edge cases remain, and many local-first tools still use a server for sync while keeping the device copy primary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware limits.&lt;/strong&gt; Local models are bounded by the machine. Battery, heat and memory all matter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared work needs thought.&lt;/strong&gt; Team features such as permissions, audit and search across everyone's material are simpler with a central server. Local-first tools have to design these deliberately.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Updates and support.&lt;/strong&gt; Software running on many different machines is harder to keep uniform than one hosted service.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to tell whether a tool is really local-first
&lt;/h2&gt;

&lt;p&gt;Marketing uses the term loosely. A few checks cut through it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Disconnect from the network. What still works?&lt;/li&gt;
&lt;li&gt;Find your data on disk. Can you open it with another program?&lt;/li&gt;
&lt;li&gt;Ask where your sign-ins and keys are stored.&lt;/li&gt;
&lt;li&gt;Ask what is uploaded in the background, not only when you press send. This includes indexing, telemetry and crash reports.&lt;/li&gt;
&lt;li&gt;Ask what happens to your data if you stop paying.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the answers are vague, the list of &lt;a href="https://prismlabs.si/blog-questions-to-ask-an-ai-vendor.html" rel="noopener noreferrer"&gt;questions to ask an AI vendor&lt;/a&gt; gives a fuller set.&lt;/p&gt;

&lt;h2&gt;
  
  
  When local-first is not the right choice
&lt;/h2&gt;

&lt;p&gt;Some work is better served centrally. Large shared datasets, heavy model training, and systems that many people must query at once belong on servers. A team with no capacity to manage devices may be safer with a well-run hosted service than with sensitive files scattered across unmanaged laptops. Local-first is a design preference, not a rule. The aim is to know where your data is, and to have chosen that on purpose.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by Aditya Goyal, AI-assisted. First published on &lt;a href="https://prismlabs.si/blog-local-first-ai-explained.html" rel="noopener noreferrer"&gt;the Prism Labs website&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>privacy</category>
      <category>security</category>
      <category>llm</category>
    </item>
    <item>
      <title>Human in the loop: designing approvals people do not skip</title>
      <dc:creator>Aditya Goyal</dc:creator>
      <pubDate>Wed, 30 Sep 2026 13:52:01 +0000</pubDate>
      <link>https://dev.to/adityagoyal009/human-in-the-loop-designing-approvals-people-do-not-skip-1a7k</link>
      <guid>https://dev.to/adityagoyal009/human-in-the-loop-designing-approvals-people-do-not-skip-1a7k</guid>
      <description>&lt;p&gt;Human in the loop means an AI agent stops before a consequential action and a person decides whether it goes ahead. It only works if that person actually reads and thinks, so the real design problem is asking rarely, asking clearly and making a considered answer as easy as a careless one.&lt;/p&gt;

&lt;p&gt;An approval that is clicked without reading protects nothing. It only moves the blame. This guide covers why approvals get skipped, how to choose what deserves one and how to design the step itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why approvals get skipped
&lt;/h2&gt;

&lt;p&gt;Anyone who has clicked "Accept all" on a cookie banner knows the pattern. Three things cause it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Too many prompts.&lt;/strong&gt; If an agent asks permission for every file it reads, the person learns within minutes that the answer is always yes. After that the hand moves before the eyes do. This is often called alert fatigue, and it is well known from fields where people work with many warnings. A system that raises frequent low-value alerts trains people to ignore all of them, including the one that matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompts that say nothing.&lt;/strong&gt; "The agent wants to run a command. Allow?" gives the person nothing to judge. If a proper decision requires opening three other windows, most people will not do it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trust built on a good record.&lt;/strong&gt; When an agent has been right many times in a row, checking feels like a waste. People relax, which is natural, and is sometimes called automation complacency. The rare error then arrives when attention is lowest.&lt;/p&gt;

&lt;p&gt;None of these is a failing of character. They are predictable responses to poor design, so the fix is in the design.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decide what deserves an approval
&lt;/h2&gt;

&lt;p&gt;Not every action needs a person. A useful test has two questions: can it be undone, and does it reach beyond the agent's own working area?&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Kind of action&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;th&gt;Sensible default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Reading and searching&lt;/td&gt;
&lt;td&gt;Opening files, looking things up&lt;/td&gt;
&lt;td&gt;Allow without asking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Changes inside a sandbox&lt;/td&gt;
&lt;td&gt;Editing files on an isolated copy, writing a draft&lt;/td&gt;
&lt;td&gt;Allow, review the result later&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Changes to shared things that can be undone&lt;/td&gt;
&lt;td&gt;Merging a branch, editing a shared note&lt;/td&gt;
&lt;td&gt;Ask, showing the exact change&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Actions that cannot be undone or that reach other people&lt;/td&gt;
&lt;td&gt;Sending email, paying, deleting, publishing, installing software&lt;/td&gt;
&lt;td&gt;Always ask, every time&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The more work you can move into the second row, the fewer prompts you need. An agent that works on a copy of a repository can edit freely, because nothing counts until a person merges. See &lt;a href="https://prismlabs.si/blog-coding-agents-isolated-worktrees.html" rel="noopener noreferrer"&gt;why coding agents should work on a copy of your repo&lt;/a&gt;. An agent that prepares an email as a draft can write whatever it likes, because nothing leaves until a person sends.&lt;/p&gt;

&lt;p&gt;This is the most effective single move: &lt;strong&gt;turn many small approvals into one meaningful review.&lt;/strong&gt; Rather than approving forty edits one at a time, review one diff. Rather than approving each sentence, read one draft.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design the prompt so it can be judged
&lt;/h2&gt;

&lt;p&gt;When you do ask, the person should be able to decide from the prompt alone.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Show the actual thing.&lt;/strong&gt; The full email with its recipients. The diff. The exact command. The name, source and version of the package to be installed. Never a summary in place of the real content, because the summary is written by the same agent whose work is being checked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Say what will happen and whether it can be reversed.&lt;/strong&gt; "This will send to four external addresses and cannot be recalled" is different from "this saves a draft".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put the risky details first.&lt;/strong&gt; External recipients, deleted files and production systems should stand out, not sit on line thirty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Give the reason.&lt;/strong&gt; One line on why the agent wants to do this, linked to the request that started it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offer more than yes and no.&lt;/strong&gt; "Edit first", "ask the agent to revise" and "reject with a reason" all produce better results than a bare refusal, and give the agent something to work with.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make no the safe default.&lt;/strong&gt; Closing the window, timing out or pressing Enter by reflex should not count as approval.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Avoid the traps
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Blanket "always allow".&lt;/strong&gt; A remembered permission is sensible for narrow, harmless things such as running the test suite. It is dangerous for broad ones such as running any command. If you offer it, scope it tightly and make it easy to see and withdraw.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Approval by the wrong person.&lt;/strong&gt; The approver should be someone with the authority and the context to judge. In shared spaces that is usually the owner of the agent or the owner of the thing being changed. See &lt;a href="https://prismlabs.si/blog-agents-owned-by-different-people.html" rel="noopener noreferrer"&gt;when agents owned by different people work in one room&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bundles that hide things.&lt;/strong&gt; Batching is good, but a batch of fifty items where one is unlike the rest is a trap. Group similar things and pull the unusual item out so it is seen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rejections that do not stick.&lt;/strong&gt; If a person rejects something and the agent proposes it again an hour later, people give up. A rejection should be remembered, with its reason.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Urgency.&lt;/strong&gt; Anything that pushes for a fast answer, such as countdowns or repeated reminders, lowers the quality of the decision. If a decision can wait, let it wait in a queue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep a record
&lt;/h2&gt;

&lt;p&gt;Every approval and rejection should be logged: what was proposed, the exact content at the time, who decided, and when. This has three uses. It lets you trace a problem back afterwards. It shows patterns, such as an approval that is accepted every time without changes, which may be safe to automate, or one that is rejected often, which points to an agent that needs better instructions. And it makes accountability real, because a named person decided on the basis of specific content.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check that it is working
&lt;/h2&gt;

&lt;p&gt;A few signs are worth watching. If approvals are nearly always granted within a second or two, people are not reading. If nothing is ever rejected or edited, either the agent is perfect or the review is a formality, and the first is unlikely. If people complain about the number of prompts, believe them and cut the number, rather than asking them to pay more attention. Attention is limited, and good design spends it only where it counts.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by Aditya Goyal, AI-assisted. First published on &lt;a href="https://prismlabs.si/blog-human-in-the-loop-approvals.html" rel="noopener noreferrer"&gt;the Prism Labs website&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>productivity</category>
      <category>security</category>
    </item>
    <item>
      <title>Why coding agents should work on a copy of your repo</title>
      <dc:creator>Aditya Goyal</dc:creator>
      <pubDate>Wed, 30 Sep 2026 01:53:19 +0000</pubDate>
      <link>https://dev.to/adityagoyal009/why-coding-agents-should-work-on-a-copy-of-your-repo-1l7e</link>
      <guid>https://dev.to/adityagoyal009/why-coding-agents-should-work-on-a-copy-of-your-repo-1l7e</guid>
      <description>&lt;p&gt;A coding agent should work on its own copy of your repository, on its own branch, so that nothing it does touches your working files until you have read the diff and merged it yourself. Git worktrees are the simplest way to do this: one repository, several separate working directories, each on a different branch.&lt;/p&gt;

&lt;p&gt;This guide explains what goes wrong without isolation, how worktrees work, the commands you need and the limits you should know about.&lt;/p&gt;

&lt;h2&gt;
  
  
  What goes wrong in a shared directory
&lt;/h2&gt;

&lt;p&gt;If an agent edits the same directory you are working in, several problems appear quickly.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mixed changes.&lt;/strong&gt; Your half-finished work and the agent's edits end up in the same set of uncommitted changes. Telling them apart later is tedious and easy to get wrong.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moving ground.&lt;/strong&gt; The agent changes a file while you are reading or editing it. Your editor, your running development server and your tests all see a project that keeps shifting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Harder review.&lt;/strong&gt; There is no clean line between before and after, so there is no single diff that shows what the agent did.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Harder undo.&lt;/strong&gt; If the result is poor, you want to throw it away. In a shared directory, discarding the agent's changes risks discarding your own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collisions between agents.&lt;/strong&gt; Two agents in one directory overwrite each other's files and run tests against each other's unfinished work. See &lt;a href="https://prismlabs.si/blog-running-several-ai-coding-agents.html" rel="noopener noreferrer"&gt;running more than one AI coding agent&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Isolation solves all five with one idea. The agent's work lives somewhere else until you choose to bring it in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a git worktree is
&lt;/h2&gt;

&lt;p&gt;Normally a git repository has one working directory: the folder where the files of your current branch are checked out. A worktree is an additional working directory attached to the same repository. Each worktree has its own checked-out branch, its own files on disk and its own staging area. All of them share one underlying store of commits and history.&lt;/p&gt;

&lt;p&gt;That sharing is the advantage over making a second clone. There is no second copy of the history to download or keep in step. A commit made in one worktree is visible from the others straight away, because there is only one repository underneath. You can compare, cherry-pick or merge between them without pushing or pulling anything.&lt;/p&gt;

&lt;p&gt;Git applies one rule that helps here: the same branch cannot be checked out in two worktrees at once. Each agent is therefore on its own branch by construction.&lt;/p&gt;

&lt;h2&gt;
  
  
  The basic commands
&lt;/h2&gt;

&lt;p&gt;Create a worktree in a sibling folder, on a new branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git worktree add ../myproject-fix-login &lt;span class="nt"&gt;-b&lt;/span&gt; agent/fix-login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See what exists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git worktree list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review the work from your main directory when the agent has finished:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="p"&gt;git diff main...agent/fix-login
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Merge if you are satisfied, then tidy up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git merge agent/fix-login
git worktree remove ../myproject-fix-login
git branch &lt;span class="nt"&gt;-d&lt;/span&gt; agent/fix-login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a worktree folder was deleted by hand, &lt;code&gt;git worktree prune&lt;/code&gt; clears the leftover record.&lt;/p&gt;

&lt;p&gt;Many agent tools now create and remove worktrees for you. It is still worth knowing what happens underneath, because at some point you will need to find a branch or clean up after a session that ended badly.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple workflow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a worktree and branch for the task.&lt;/strong&gt; Name the branch after the task, and the agent if you use several.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start the agent in that directory&lt;/strong&gt; with a bounded task and a clear finishing condition, such as a test that must pass.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let it work freely there.&lt;/strong&gt; Because nothing counts until you merge, the agent does not need to ask before each edit. This removes most of the small permission prompts that people learn to click through, a problem described in &lt;a href="https://prismlabs.si/blog-human-in-the-loop-approvals.html" rel="noopener noreferrer"&gt;designing approvals people do not skip&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review one diff.&lt;/strong&gt; Read it as you would a colleague's pull request. Run the checks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merge it yourself,&lt;/strong&gt; ask for changes, or delete the branch and lose nothing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The important shift is that review happens once, at a natural boundary, with the full change in front of you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things that catch people out
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Files git does not track are not copied.&lt;/strong&gt; A new worktree contains only tracked files. Installed dependencies, build output and local settings files that git ignores will be missing. You will usually need to run your install step in each worktree, and provide any local configuration the project needs. Be careful about copying secrets into a directory an agent can read; give it test credentials where possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disk space and install time.&lt;/strong&gt; History is shared, but each worktree has its own checked-out files and its own installed dependencies. For large projects this adds up. Remove worktrees when you have finished with them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shared machine resources.&lt;/strong&gt; Separate directories do not give you separate ports, databases or caches. Two worktrees running the same development server will collide on the port. Give each its own, or run one at a time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stale branches.&lt;/strong&gt; If the main branch moves on while an agent works, its branch falls behind. Bring it up to date before you review, so you are judging the change against the current code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Submodules and unusual setups.&lt;/strong&gt; Projects that use git submodules or depend on absolute paths may need extra care. Test the process once by hand before relying on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A worktree is not a sandbox
&lt;/h2&gt;

&lt;p&gt;This point matters most. A worktree isolates the agent's changes from your working files. It does not restrict what the agent can do on your computer. An agent that can run shell commands can still read other folders, use the network and reach anything your user account can reach. It also shares the repository's configuration and hooks with your main checkout.&lt;/p&gt;

&lt;p&gt;For protection against a misbehaving agent or a malicious instruction hidden in something it reads, you need other measures as well: limited tools and permissions, approval for risky commands, and for stronger separation a container or virtual machine. See &lt;a href="https://prismlabs.si/blog-agent-skills-plugins-tool-servers.html" rel="noopener noreferrer"&gt;skills, plugins and tool servers explained&lt;/a&gt; for how an agent's reach is decided. Use worktrees to keep work organised and reviewable, and use permissions and sandboxes for safety.&lt;/p&gt;

&lt;p&gt;Equally, keep the step that leaves your machine under your own control. An agent can commit to its branch as often as it likes. Pushing to a shared remote, opening a pull request and merging are better kept as decisions a person makes.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by Aditya Goyal, AI-assisted. First published on &lt;a href="https://prismlabs.si/blog-coding-agents-isolated-worktrees.html" rel="noopener noreferrer"&gt;the Prism Labs website&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>productivity</category>
      <category>security</category>
    </item>
    <item>
      <title>What actually gets sent to an AI provider when you ask?</title>
      <dc:creator>Aditya Goyal</dc:creator>
      <pubDate>Wed, 30 Sep 2026 01:52:48 +0000</pubDate>
      <link>https://dev.to/adityagoyal009/what-actually-gets-sent-to-an-ai-provider-when-you-ask-44e3</link>
      <guid>https://dev.to/adityagoyal009/what-actually-gets-sent-to-an-ai-provider-when-you-ask-44e3</guid>
      <description>&lt;p&gt;When you ask an AI model a question, the provider receives the whole request, not only the sentence you typed: hidden instructions, the earlier conversation, any attached files or retrieved passages, and descriptions of the tools the model may use. The model has no memory between requests, so everything it needs to know must be sent again each time.&lt;/p&gt;

&lt;p&gt;That second point surprises people. It is the key to understanding what leaves your device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Models are stateless
&lt;/h2&gt;

&lt;p&gt;A large language model, as served over an API, does not remember your last message. Each request stands alone. The appearance of memory in a chat comes from the application, which resends the conversation so far along with your new message.&lt;/p&gt;

&lt;p&gt;So by the tenth message in a long chat, the request contains messages one to nine as well. If you pasted a long document in message two, that document is sent again with every later message in that conversation, unless the application trims or summarises the history. Some providers offer caching so that repeated content is cheaper and faster to process, but the content is still part of the request.&lt;/p&gt;

&lt;h2&gt;
  
  
  The parts of a typical request
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;th&gt;Who wrote it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;System prompt&lt;/td&gt;
&lt;td&gt;Standing instructions: role, rules, tone, format&lt;/td&gt;
&lt;td&gt;The application&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conversation history&lt;/td&gt;
&lt;td&gt;Earlier messages and replies&lt;/td&gt;
&lt;td&gt;You and the model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Your new message&lt;/td&gt;
&lt;td&gt;The question you just typed&lt;/td&gt;
&lt;td&gt;You&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Attachments&lt;/td&gt;
&lt;td&gt;Files, images, pasted text&lt;/td&gt;
&lt;td&gt;You&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retrieved context&lt;/td&gt;
&lt;td&gt;Passages the application looked up for this question&lt;/td&gt;
&lt;td&gt;The application&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool definitions&lt;/td&gt;
&lt;td&gt;Names and descriptions of tools the model may call&lt;/td&gt;
&lt;td&gt;The application&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool results&lt;/td&gt;
&lt;td&gt;Output from tools called earlier in the task&lt;/td&gt;
&lt;td&gt;Your systems&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Parameters&lt;/td&gt;
&lt;td&gt;Model name, length limits and similar settings&lt;/td&gt;
&lt;td&gt;The application&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Alongside the content, the request carries the usual network details: an API key or session token that identifies the account, your IP address, and headers naming the client software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retrieved context: the part you do not see
&lt;/h2&gt;

&lt;p&gt;Many AI tools search your documents before asking the model. This pattern is called retrieval-augmented generation. The application finds passages that look relevant and places them in the request, so that the model can answer from them.&lt;/p&gt;

&lt;p&gt;This is useful, and it is also the easiest place for more to leave your device than you expected. You typed one line. The application may have added several pages from your files. A well-designed tool shows you what it attached. The guide on &lt;a href="https://prismlabs.si/blog-ai-answers-with-sources.html" rel="noopener noreferrer"&gt;AI answers with sources&lt;/a&gt; explains why this pattern is worth the trade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agents send more than chats
&lt;/h2&gt;

&lt;p&gt;An AI agent works in a loop. It asks the model what to do next, runs a tool, sends the result back, and repeats. Each tool result becomes part of the next request.&lt;/p&gt;

&lt;p&gt;For a coding agent, that means file contents, directory listings, command output, error messages and test logs all go to the provider as the task proceeds. If a command prints an environment variable that holds a password, that password is now in a prompt. If the agent reads a configuration file with credentials in it, the same applies.&lt;/p&gt;

&lt;p&gt;This is why the set of tools and files an agent can reach matters so much. The guide on &lt;a href="https://prismlabs.si/blog-agent-skills-plugins-tool-servers.html" rel="noopener noreferrer"&gt;skills, plugins and tool servers&lt;/a&gt; covers how those are granted.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is usually not sent
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Files the application never read.&lt;/strong&gt; A model cannot browse your disk. It sees only what the application places in a request. The risk lies in how much the application is allowed to read, not in the model reaching out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your password for the provider.&lt;/strong&gt; A request carries a token or key, not the password itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Other applications' data.&lt;/strong&gt; Unless a tool or integration has been connected that fetches it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treat these as the normal case, not a guarantee. What a particular application reads and uploads in the background, such as indexing, telemetry and crash reports, is a question for that vendor.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happens at the other end
&lt;/h2&gt;

&lt;p&gt;Once a request arrives, the provider processes it and returns a response. What happens afterwards depends on the provider, the plan and your settings. The points that commonly vary are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how long prompts and outputs are retained, and in which logs&lt;/li&gt;
&lt;li&gt;whether content may be used to train or improve models, and whether that is opt-in or opt-out&lt;/li&gt;
&lt;li&gt;whether staff or automated systems may review content, for example for abuse monitoring&lt;/li&gt;
&lt;li&gt;where the data is processed geographically&lt;/li&gt;
&lt;li&gt;which other companies process it on the provider's behalf&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consumer plans and business or API plans from the same provider often have different terms. Do not rely on a summary written by someone else, including this one. Check the provider's current terms for the exact plan you use.&lt;/p&gt;

&lt;p&gt;There may also be an intermediary. If you use an AI feature inside another product, the request may pass through that product's servers before reaching the model provider. That adds a custodian. The guide on &lt;a href="https://prismlabs.si/blog-what-is-data-custody-in-ai.html" rel="noopener noreferrer"&gt;data custody in AI&lt;/a&gt; explains why each hop matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to keep requests small
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start new conversations for new topics.&lt;/strong&gt; Old history stops being resent.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Paste the relevant section, not the whole document.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove what the model does not need.&lt;/strong&gt; Names, account numbers and identifiers can often be replaced with placeholders without harming the answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep secrets out of files and output an agent can read.&lt;/strong&gt; Use a proper secret store. See &lt;a href="https://prismlabs.si/blog-where-ai-keys-should-live.html" rel="noopener noreferrer"&gt;where your AI keys and logins should live&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limit what agents can reach.&lt;/strong&gt; Give each one the folders and tools the job needs, no more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prefer tools that show you the request.&lt;/strong&gt; If you can see what was attached, you can correct it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of this requires avoiding hosted models. It requires knowing that the unit of disclosure is the full request, and shaping that request with care.&lt;/p&gt;

&lt;p&gt;This is general information, not legal advice. If you handle personal or regulated data, check your obligations with your own adviser.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by Aditya Goyal, AI-assisted. First published on &lt;a href="https://prismlabs.si/blog-what-gets-sent-to-an-ai-provider.html" rel="noopener noreferrer"&gt;the Prism Labs website&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>privacy</category>
      <category>security</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
