<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator>
  <link href="https://blog.weisser.dev/feed.xml" rel="self" type="application/atom+xml" />
  <link href="https://blog.weisser.dev/" rel="alternate" type="text/html" hreflang="en" />
  <updated>2026-11-25T10:59:11+00:00</updated>
  <id>https://blog.weisser.dev/feed.xml</id>
  <title type="html">weisser.dev (English)</title>
  <subtitle>Developer blog by Erik Weisser – microservices, cloud, AI, automation and side projects.</subtitle>
  <author><name>Erik Weisser</name></author>
  <entry xml:lang="en">
    <title type="html">Why I am building the Agentic Workflow Protocol</title>
    <link href="https://blog.weisser.dev/blog/2026/11/25/agentic-workflow-protocol/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-11-25T00:00:00+00:00</published>
    <updated>2026-11-25T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/11/25/agentic-workflow-protocol/</id>
    <category term="projects" />
    <category term="ai" />
    <summary type="html">An agent can be impressive in a demo and still be difficult to operate as part of a larger system. Which tools can it use? What can it spend? Who owns the workflow, and when does a human need to approve a step? Those questions become harder to answer when the answers live in prompts, code and pla...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/11/25/agentic-workflow-protocol/">&lt;p&gt;An agent can be impressive in a demo and still be difficult to operate as part of a larger system. Which tools can it use? What can it spend? Who owns the workflow, and when does a human need to approve a step? Those questions become harder to answer when the answers live in prompts, code and platform-specific configuration.&lt;/p&gt;

&lt;p&gt;I started the &lt;a href=&quot;https://agenticworkflowprotocol.org/&quot;&gt;Agentic Workflow Protocol (AWP)&lt;/a&gt; as a personal project to explore a more explicit way to describe agentic workflows. The idea is to bring the work, its boundaries and its governance into a machine-readable description that people and tooling can inspect.&lt;/p&gt;

&lt;h2 id=&quot;a-description-not-another-agent-platform&quot;&gt;A description, not another agent platform&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/awp/1-en.svg&quot; alt=&quot;AWP describes workflows, guardrails and evidence; a runtime enforces the rules.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;AWP is an open specification, not a runtime or a hosted platform. A workflow description can express agents, tools and steps alongside aspects such as budgets, permissions, environments, ownership, risk and human approval. It also describes information that implementations can record for audit and reproducibility.&lt;/p&gt;

&lt;p&gt;The distinction matters: &lt;strong&gt;writing a permission or a budget into a document does not enforce it&lt;/strong&gt;. A runtime must interpret and enforce the rules, and teams still need to test the implementation, manage access and decide which policies apply. AWP does not make a system compliant by itself.&lt;/p&gt;

&lt;h2 id=&quot;how-it-relates-to-mcp-and-a2a&quot;&gt;How it relates to MCP and A2A&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/awp/2-en.svg&quot; alt=&quot;AWP defines workflows, MCP connects tools and A2A supports agent communication.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I see these as complementary layers. MCP provides a way for agents to interact with tools and resources; A2A addresses communication between agents. AWP focuses on describing the workflow around them: what should happen, under which constraints, and what needs to be recorded. The exact integration depends on the implementation rather than a promise that any combination will automatically work together.&lt;/p&gt;

&lt;h2 id=&quot;why-make-the-boundaries-explicit&quot;&gt;Why make the boundaries explicit?&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/awp/3-en.svg&quot; alt=&quot;Define and validate a workflow before a runtime enforces its rules.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Consider a workflow that examines a repository and proposes a fix. A human reviewing its configuration should be able to find the available tools, execution limits and approval requirements without reconstructing them from a long prompt. A validator can help check whether a description follows the schema; it cannot guarantee that the workflow is safe or that the runtime behaves correctly.&lt;/p&gt;

&lt;p&gt;This is particularly useful to me when discussing agent systems across teams: it gives architecture, security and operations a shared artifact to question and improve. It is an approach to the problem, not the only possible one.&lt;/p&gt;

&lt;h2 id=&quot;early-stage-and-next-steps&quot;&gt;Early stage and next steps&lt;/h2&gt;

&lt;p&gt;AWP is &lt;strong&gt;a draft in the alpha stage&lt;/strong&gt;. Its formats and semantics can change, and the project does not yet claim production-ready interoperability. The repository includes the specification work and conformance material; an editor and validator are also available. Check the current project documentation for supported versions and limitations before experimenting.&lt;/p&gt;

&lt;p&gt;A related &lt;a href=&quot;https://blog.openagentix.si/posts/classifier-models-and-autonomy-levels/&quot;&gt;OpenAgentix News article on classifier models and autonomy levels&lt;/a&gt; discusses one governance question that appears in this space. For the protocol itself, start with the &lt;a href=&quot;https://agenticworkflowprotocol.org/&quot;&gt;AWP website&lt;/a&gt; or the &lt;a href=&quot;https://github.com/agenticworkflowprotocol/agenticworkflowprotocol.org&quot;&gt;source repository&lt;/a&gt;. Feedback and contributions are welcome.&lt;/p&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Agentic Workflow Protocol, &lt;a href=&quot;https://github.com/agenticworkflowprotocol/agenticworkflowprotocol.org&quot;&gt;project repository and README&lt;/a&gt;, accessed 25 November 2026.&lt;/li&gt;
  &lt;li&gt;OpenAgentix News, &lt;a href=&quot;https://blog.openagentix.si/posts/classifier-models-and-autonomy-levels/&quot;&gt;Classifier models and autonomy levels&lt;/a&gt;, accessed 25 November 2026.&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">A Smart Photo Dashboard from an Old Fire TV and Monitor</title>
    <link href="https://blog.weisser.dev/blog/2026/11/22/a-fire-tv-photo-dashboard/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-11-22T00:00:00+00:00</published>
    <updated>2026-11-22T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/11/22/a-fire-tv-photo-dashboard/</id>
    <category term="projects" />
    <summary type="html">I wanted to turn an old Fire TV and a spare PC monitor into a portrait photo frame: family pictures on the screen, a clock and weather above them, and useful household information nearby. The monitor already had a place on the wall. The challenge was making old streaming hardware feel like a purp...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/11/22/a-fire-tv-photo-dashboard/">&lt;p&gt;I wanted to turn an old Fire TV and a spare PC monitor into a portrait photo frame: family pictures on the screen, a clock and weather above them, and useful household information nearby. The monitor already had a place on the wall. The challenge was making old streaming hardware feel like a purpose-built dashboard without adding another cloud account or buying a new display.&lt;/p&gt;

&lt;p&gt;The result is &lt;strong&gt;Stillframe&lt;/strong&gt;, an Android app for Fire TV and Android TV. The public source, APK downloads and an interactive web demo are available in the &lt;a href=&quot;https://github.com/weisser-dev/fire-tv-diashow&quot;&gt;fire-tv-diashow repository&lt;/a&gt; and on the &lt;a href=&quot;https://weisser-dev.github.io/fire-tv-diashow/&quot;&gt;project page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/projects/fire-tv-dashboard/fire-tv-dashboard-mock.svg&quot; alt=&quot;Concept mockup: a portrait monitor running Stillframe, connected to an existing Fire TV and a phone over local Wi-Fi.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Concept mockup of the finished setup; the screen layout follows the app, while the surrounding hardware illustration is not a photograph.&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-dashboard&quot;&gt;The dashboard&lt;/h2&gt;

&lt;p&gt;At its simplest, Stillframe is a slideshow for local folders and albums. Photos can be selected on the TV or sent from a phone by scanning a QR code. The phone page is served by the TV on the same local network, so uploads go directly to the device. It also lets me manage notes, checklists and calendar visibility without typing with the remote.&lt;/p&gt;

&lt;p&gt;The display can show the time, date and optional weather over the photos. A subscribed calendar feed adds upcoming events; recurring series can be hidden from the phone page. Calendar entries whose title starts with “TODO:”, “ToDo:” or “To do:” also appear as dated tasks. Notes and to-dos sit alongside the calendar, and the sleep screen can keep the clock and household dashboard visible while the pictures are off. A weekly schedule can switch between slideshow and sleep hours.&lt;/p&gt;

&lt;p&gt;The Fire TV remote remains the main control. The directional pad moves through settings and image management, while the centre button opens playback controls and the quick menu. The app also supports portrait presentation, image fitting, gentle pan-and-zoom, shuffle, and per-photo timing.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/projects/fire-tv-dashboard/firetv-slideshow-controls.png&quot; alt=&quot;Real Fire TV screenshot of Stillframe playing a photo with clock, date, weather and remote controls.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A capture from the running app. The displayed sample photo contains an animal, not a person.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/projects/fire-tv-dashboard/firetv-sleep-clock.png&quot; alt=&quot;Real Fire TV screenshot of the sleep screen with a dim clock, date and weather.&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;local-first-with-clear-network-boundaries&quot;&gt;Local first, with clear network boundaries&lt;/h2&gt;

&lt;p&gt;Photos, albums, notes and tasks are stored on the TV. Uploading from a phone needs a local Wi-Fi network, but it does not need an internet connection, account or hosted backend. The app does not send the photo library to a developer server. Google Photos and Ambient integration are not part of the current app; the local workflow avoids depending on their partner APIs.&lt;/p&gt;

&lt;p&gt;That makes the core photo-and-phone workflow usable on an isolated home network. It is not accurate to call every feature fully air-gapped: weather comes from Open-Meteo, calendar refresh reads the configured feed, and update checks contact GitHub. Those optional services need internet access to refresh. Disable them for a disconnected setup; locally stored photos, notes and tasks stay on the device.&lt;/p&gt;

&lt;h2 id=&quot;designing-for-old-hardware&quot;&gt;Designing for old hardware&lt;/h2&gt;

&lt;p&gt;The Fire TV is resource-constrained compared with a modern phone. Fire OS also keeps the HDMI output in landscape, even when the physical monitor is mounted vertically. Instead of modifying firmware or requiring root, Stillframe rotates its own interface and maps remote navigation to the rotated layout. The system output remains under Fire OS control.&lt;/p&gt;

&lt;p&gt;The same constraints shape the visuals. A live background blur can be expensive, so the glass-style panels use lightweight translucent layers. The next photo is decoded ahead of a slide change and placed beneath the current photo. The current image fades away without a black frame; only after that does movement begin on the new image. Keeping this separate from the photo motion avoids the restart-and-double-motion effect that made earlier transitions look jerky on the old hardware.&lt;/p&gt;

&lt;p&gt;The app can keep running after a reboot, but its sleep schedule controls the app display rather than waking a Fire TV that the operating system has fully powered down. It is a reuse project, so those boundaries matter as much as the feature list.&lt;/p&gt;

&lt;h2 id=&quot;what-i-wanted-to-prove&quot;&gt;What I wanted to prove&lt;/h2&gt;

&lt;p&gt;This did not need to be another smart-home platform. I wanted the old monitor to become a useful family display, with local photos first and the everyday details that make a dashboard worth leaving on: the time, weather, events, notes and tasks. A phone is a much easier place to edit those details than a TV remote.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://weisser-dev.github.io/fire-tv-diashow/&quot;&gt;interactive demo&lt;/a&gt; shows the portrait TV interface and remote controls in a browser. It is a web mockup rather than the Android app running in a browser, and it does not upload files. The &lt;a href=&quot;https://github.com/weisser-dev/fire-tv-diashow&quot;&gt;repository&lt;/a&gt; contains the app, build instructions and current feature notes.&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">Why wearable interfaces could be the next home for coding agents</title>
    <link href="https://blog.weisser.dev/blog/2026/11/14/wearables-and-coding-agents/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-11-14T00:00:00+00:00</published>
    <updated>2026-11-14T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/11/14/wearables-and-coding-agents/</id>
    <category term="ai" />
    <category term="agents" />
    <summary type="html">Originally published on OpenAgentix News.
</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/11/14/wearables-and-coding-agents/">&lt;p&gt;Originally published on &lt;a href=&quot;https://blog.openagentix.si/posts/wearables-and-coding-agents/&quot;&gt;OpenAgentix News&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/wearables/wearable-agents-cover.jpg&quot; alt=&quot;Concept illustration of smart glasses showing a small coding interface&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI-generated concept illustration; it is not a photograph or a depiction of a shipped product.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A coding agent may work for minutes while I am away from my desk. The interesting moment is not always its final answer. Sometimes it is a question, a permission request, or a brief update that needs my attention. Today that usually means returning to a terminal or opening a phone.&lt;/p&gt;

&lt;p&gt;I think wearables could make those small interactions feel less disruptive. A glance can show what needs a decision; a gesture can move between choices; a short dictated response can send the agent back to work. This is a personal prediction, not a claim that glasses will replace a developer’s screen.&lt;/p&gt;

&lt;h2 id=&quot;from-a-screen-to-a-glance&quot;&gt;From a screen to a glance&lt;/h2&gt;

&lt;p&gt;Traditional development remains at the desk: inspecting diffs, comparing files and reviewing complicated commands deserve a proper display. A wearable is useful at a different scale: &lt;strong&gt;what changed, what is waiting, and what should I do next?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A good interface would let me move through recent conversations, select a project, see the latest output and explicitly approve or reject a supported request. It would help me respond in my own words or choose a suggested reply without silently sending it. For a small display, fewer steps and clearly visible focus matter more than packing in every dashboard metric.&lt;/p&gt;

&lt;p&gt;Meta describes web apps for Ray-Ban Display as HTML, CSS and JavaScript applications. Its developer toolkit is one example of how familiar web technologies can reach a wearable display; capabilities and behavior still depend on the device and platform. &lt;a href=&quot;https://github.com/meta/meta-wearables-webapp&quot;&gt;Meta’s web-app toolkit&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;why-build-openglassui&quot;&gt;Why build OpenGlassUI?&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/weisser-dev/openglassui&quot;&gt;OpenGlassUI&lt;/a&gt; is my experimental open-source attempt at this idea. A local companion runs alongside coding-agent tools on a computer or server. A paired wearable interface can show supported conversations and offer controls, while the agent harness continues to own its model connection, tools and permissions.&lt;/p&gt;

&lt;p&gt;The project has dedicated integrations for Codex, Claude Code, Kiro CLI and OpenCode, as well as support for configurable agents using the Agent Client Protocol. Capabilities vary by agent and session: a feature visible in one integration is not necessarily available in another. See the repository’s &lt;a href=&quot;https://github.com/weisser-dev/openglassui#readme&quot;&gt;support matrix and current limitations&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;OpenGlassUI is a prototype, not a promise of seamless remote control. Imported sessions from another client, external approvals, live activity, wearable notifications and device compatibility have important limitations. Some flows have been exercised on real hardware, but complete end-to-end behavior has not been verified across devices. Local or remote exposure also needs careful configuration. Check the repository before relying on any particular feature.&lt;/p&gt;

&lt;h2 id=&quot;trust-and-attention-are-the-hard-parts&quot;&gt;Trust and attention are the hard parts&lt;/h2&gt;

&lt;p&gt;An assistant close to your eyes should earn the right to interrupt. It should show where a message came from, make permissions explicit, avoid automatic approvals, and let the wearer choose when to disconnect. Conversation context sent to a provider for suggestions is still shared with that provider; local software is not the same as a completely local model.&lt;/p&gt;

&lt;p&gt;I also do not think every activity belongs on a wearable. Notifications that cannot be controlled, tiny unreadable code blocks, unclear connections and a headset that guesses the wrong permission would make the experience worse. Speech and gestures need alternatives, and people nearby deserve consideration when cameras and microphones are involved.&lt;/p&gt;

&lt;h2 id=&quot;an-interface-worth-experimenting-with&quot;&gt;An interface worth experimenting with&lt;/h2&gt;

&lt;p&gt;The opportunity, as I see it, is not a smaller laptop on your face. It is a quieter way to keep a human in the loop while an agent works elsewhere. The glasses should surface the decision and then get out of the way.&lt;/p&gt;

&lt;p&gt;OpenAgentix is a collection of private, non-commercial open-source experiments by &lt;a href=&quot;https://github.com/weisser-dev&quot;&gt;weisser-dev&lt;/a&gt;. &lt;a href=&quot;https://github.com/weisser-dev/openglassui&quot;&gt;Browse OpenGlassUI&lt;/a&gt;, inspect the code and decide whether this direction is useful to you. It is independent of Meta and the agent providers.&lt;/p&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Meta, &lt;a href=&quot;https://github.com/meta/meta-wearables-webapp&quot;&gt;Meta Wearables Web App AI Toolkit&lt;/a&gt;, repository, accessed 14 November 2026.&lt;/li&gt;
  &lt;li&gt;OpenGlassUI, &lt;a href=&quot;https://github.com/weisser-dev/openglassui#readme&quot;&gt;README and support matrix&lt;/a&gt;, repository, accessed 14 November 2026.&lt;/li&gt;
  &lt;li&gt;Agent Client Protocol, &lt;a href=&quot;https://agentclientprotocol.com/overview/introduction&quot;&gt;Introduction&lt;/a&gt;, accessed 14 November 2026.&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">How I Optimise My Agents: Logs, Reports, Vetoes and Small Steps</title>
    <link href="https://blog.weisser.dev/blog/2026/10/13/how-i-optimise-my-agents/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-10-13T00:00:00+00:00</published>
    <updated>2026-10-13T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/10/13/how-i-optimise-my-agents/</id>
    <category term="operations" />
    <category term="ai" />
    <summary type="html">Getting an agent to do something once is easy. Getting ten scheduled agents to keep doing useful things for months, without me babysitting them, is a different job. Most of what makes that work is not clever prompting. It is boring operations: logs, budgets, permissions, reviews.
</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/10/13/how-i-optimise-my-agents/">&lt;p&gt;Getting an agent to do something once is easy. Getting ten scheduled agents to keep doing useful things for months, without me babysitting them, is a different job. Most of what makes that work is not clever prompting. It is boring operations: logs, budgets, permissions, reviews.&lt;/p&gt;

&lt;p&gt;This post is the checklist I follow. To keep it concrete, everything below is shown on an &lt;strong&gt;invented&lt;/strong&gt; example: a small recipe-sharing site called &lt;em&gt;Pantry Notes&lt;/em&gt;. The app, the numbers and the log entries are made up for this post.&lt;/p&gt;

&lt;h2 id=&quot;the-eight-habits&quot;&gt;The eight habits&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;One run-log format for every agent.&lt;/strong&gt; Each scheduled run appends one line to the same kind of file. Without that, “what did the agents do last week?” is archaeology.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A short morning report.&lt;/strong&gt; One page, generated from the logs, readable in a minute. If it is long, I stop reading it.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A review agent that reads all logs.&lt;/strong&gt; Its only job is to tell me what &lt;em&gt;quietly stopped&lt;/em&gt;: agents that did not run, runs that always end the same way, outputs that stopped changing.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A veto window before anything is published.&lt;/strong&gt; Automatic publishing waits, for example, 24 hours as a draft. I can cancel; silence means go.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Tight permissions per task.&lt;/strong&gt; The changelog agent can read the repo and write one file. It cannot touch CI or secrets.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Hard budgets and timeouts.&lt;/strong&gt; Every run has a maximum number of turns, a spending cap and a wall-clock timeout. A stuck agent is stopped by the runner, not by me.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The right model per task.&lt;/strong&gt; A big model for design and review, a mid-size one for implementation, a small one for tests and summaries.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Small, verified steps, and failures written down.&lt;/strong&gt; Each run does one small thing and proves it worked. When something goes wrong, the lesson goes into the agent’s instructions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;the-worked-example-pantry-notes&quot;&gt;The worked example: Pantry Notes&lt;/h2&gt;

&lt;p&gt;Pantry Notes is a fictional recipe-sharing site with four scheduled agents:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Agent&lt;/th&gt;
      &lt;th&gt;Task&lt;/th&gt;
      &lt;th&gt;Model class&lt;/th&gt;
      &lt;th&gt;Permissions&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;deps-bumper&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;Bump patch/minor dependencies, open a PR&lt;/td&gt;
      &lt;td&gt;mid-size&lt;/td&gt;
      &lt;td&gt;read repo, write branch, run tests&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;link-checker&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;Find dead links in recipes, file a list&lt;/td&gt;
      &lt;td&gt;small&lt;/td&gt;
      &lt;td&gt;read repo, read-only HTTP&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;changelog-writer&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;Draft release notes from merged PRs&lt;/td&gt;
      &lt;td&gt;small&lt;/td&gt;
      &lt;td&gt;read git history, write &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;drafts/&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;reviewer&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;Read all logs, report what stopped&lt;/td&gt;
      &lt;td&gt;big&lt;/td&gt;
      &lt;td&gt;read logs only&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h3 id=&quot;1-one-run-log-format&quot;&gt;1. One run-log format&lt;/h3&gt;

&lt;p&gt;Every run, whatever the agent, ends by appending a single JSON line to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;runs/&amp;lt;agent&amp;gt;.jsonl&lt;/code&gt;. The runner writes it, not the agent, so a crashed agent still leaves a record. Pretty-printed here for readability:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;ts&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;2026-10-09T03:12:44Z&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;agent&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;deps-bumper&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;run_id&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;deps-bumper-20261009-0312&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;model_class&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;mid&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;status&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;partial&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;duration_s&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;412&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;turns&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;23&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;cost_usd&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.84&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;budget_usd&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1.50&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;timeout_s&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;900&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;task&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;bump patch and minor dependencies&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;result&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;2 of 3 bumps merged-ready, 1 skipped: tests failed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;artifacts&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;pr:example/pantry-notes#212&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;verified&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;next_action&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;retry skipped bump with pinned lockfile&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;error&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The point is not these exact fields. The point is that &lt;strong&gt;status, cost, duration, result and whether the result was verified&lt;/strong&gt; are always in the same place, so one small script (or one small agent) can read all of them.&lt;/p&gt;

&lt;h3 id=&quot;2-the-morning-report&quot;&gt;2. The morning report&lt;/h3&gt;

&lt;p&gt;A summary job (small model, read-only) turns the last 24 hours of logs into a report. This is the whole thing, and it is meant to stay that short:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Pantry Notes - agents - 2026-10-10

Ran 4 of 4 scheduled agents. Total cost: $2.10 (cap: $6.00).

OK       link-checker      38 dead links found, 5 new since Tuesday
PARTIAL  deps-bumper       2 bumps ready (PR #212), 1 skipped: tests failed
DRAFT    changelog-writer  release notes for v1.8.0 queued, publishes
                           Sat 09:00 unless vetoed
OK       reviewer          see below

Needs you today: look at PR #212, decide on the v1.8.0 draft.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I read this with coffee. If every line is OK, it takes ten seconds.&lt;/p&gt;

&lt;h3 id=&quot;3-the-review-agent&quot;&gt;3. The review agent&lt;/h3&gt;

&lt;p&gt;The morning report only describes what &lt;em&gt;happened&lt;/em&gt;. The failure mode I worry about is what &lt;em&gt;did not&lt;/em&gt; happen. So a separate review agent (the big model, read-only access to the logs) reads all the run logs of the past two weeks and must answer one question: &lt;strong&gt;what quietly stopped, or quietly stopped being useful?&lt;/strong&gt; It always returns exactly three items, ranked:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;1. link-checker: no new fix PRs for 11 days, although it reports dead
   links every run. The reports are being produced but nobody acts on
   them. Suggest: let it open one PR per run with at most 5 fixes.

2. changelog-writer: last 3 drafts were identical except the version
   number. Either the template is too rigid or it no longer reads the
   merged PRs. Check the artifacts of runs 0928, 0930, 1007.

3. deps-bumper: &quot;partial&quot; 4 runs in a row, always the same skipped
   package. A known failure is being retried forever at a cost of
   about $0.30 per run. Suggest: record it as a known issue in the
   agent&apos;s instructions and skip it explicitly.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Three items is deliberate. A list of fifteen “observations” gets ignored; three ranked ones get done. Note that none of these is a crash. They are the quiet failures: an agent that keeps running and stops mattering.&lt;/p&gt;

&lt;h3 id=&quot;4-the-veto-window&quot;&gt;4. The veto window&lt;/h3&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;changelog-writer&lt;/code&gt; never publishes directly. It writes &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;drafts/release-1.8.0.md&lt;/code&gt; and a timer publishes it after 24 hours, unless a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VETO&lt;/code&gt; file next to it exists. The morning report tells me about the pending draft, so the veto window is actually seen. This costs one day of latency and removes the fear of automatic publishing. Anything that goes public, sends a message or spends money gets such a window, or a human approval.&lt;/p&gt;

&lt;h3 id=&quot;5-tight-permissions-per-task&quot;&gt;5. Tight permissions per task&lt;/h3&gt;

&lt;p&gt;Each agent gets an explicit allow-list for exactly its task, nothing inherited. Claude Code supports this with permission rules and modes (&lt;a href=&quot;https://code.claude.com/docs/en/permissions&quot;&gt;permissions docs&lt;/a&gt;). For the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;link-checker&lt;/code&gt;, for instance, the allow-list is “read files, run the link-check script, write the report file”, and nothing else. When an agent needs something new, I add that one thing, on purpose. The default is &lt;em&gt;deny&lt;/em&gt;.&lt;/p&gt;

&lt;h3 id=&quot;6-hard-budgets-and-timeouts&quot;&gt;6. Hard budgets and timeouts&lt;/h3&gt;

&lt;p&gt;Three limits per run, enforced by the runner and not just requested in the prompt: a maximum number of turns, a maximum spend, and a wall-clock timeout. Claude Code’s CLI has options for the first two (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--max-turns&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--max-budget-usd&lt;/code&gt;, see the &lt;a href=&quot;https://code.claude.com/docs/en/cli-reference&quot;&gt;CLI reference&lt;/a&gt;); the timeout I do with the scheduler. In the log above, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;deps-bumper&lt;/code&gt; used $0.84 of a $1.50 cap. If a run hits the cap, that is a finding in itself and shows up in the morning report.&lt;/p&gt;

&lt;h3 id=&quot;7-model-choice-per-task&quot;&gt;7. Model choice per task&lt;/h3&gt;

&lt;p&gt;I do not use one model for everything:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Big model:&lt;/strong&gt; design decisions, the review agent, anything that has to judge other work.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Mid-size model:&lt;/strong&gt; implementation, like the dependency bumps.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Small model:&lt;/strong&gt; running tests, summaries, the morning report.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is both cheaper and often better: the small model is fast enough for routine work, and the expensive one is spent where judgement matters. When unsure, I pick the more capable class for the first week and downgrade once the logs show it is not needed.&lt;/p&gt;

&lt;h3 id=&quot;8-small-steps-and-lessons-learned&quot;&gt;8. Small steps and lessons learned&lt;/h3&gt;

&lt;p&gt;Each run does one small thing and checks it, for example “bump one package, run the tests, record the result” rather than “update everything”. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;verified&lt;/code&gt; field in the log says whether the agent actually ran the check, not just whether it claimed success. A claim without verification counts as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;unverified&lt;/code&gt; in the report.&lt;/p&gt;

&lt;p&gt;And when something fails, the lesson goes into the agent’s own instructions. After the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;deps-bumper&lt;/code&gt; kept retrying the same broken bump, its instruction file got two new lines:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Known issue: package &quot;image-resizer&quot; 4.x breaks the upload tests.
Do not bump it. Note it in the log as &quot;skipped: known issue&quot; and move on.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The failure happens once, the instruction file remembers it, and the review agent’s next report is shorter. Treat the instructions as a living runbook, reviewed like code.&lt;/p&gt;

&lt;h2 id=&quot;open-standards-for-agent-workflows&quot;&gt;Open standards for agent workflows&lt;/h2&gt;

&lt;p&gt;Once you run several agents, you end up describing the same things every time: who owns a workflow, which agent does which step, what it may use, what its budget is, what gets logged. Open standards for describing agent workflows now exist, for example the &lt;a href=&quot;https://agenticworkflowprotocol.org&quot;&gt;Agentic Workflow Protocol (AWP)&lt;/a&gt;. Its site describes it as an open specification for portable, auditable and policy-controlled agentic workflows, defined in declarative YAML manifests that cover agents, tools, execution order, budgets, permissions and audit events. It is marked as a draft (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1alpha1&lt;/code&gt;), so fields may change. I am mentioning it as an example of the direction, not as something this post depends on; the habits above work with plain files and a scheduler.&lt;/p&gt;

&lt;h2 id=&quot;what-i-would-do-first&quot;&gt;What I would do first&lt;/h2&gt;

&lt;p&gt;If you have agents running and none of this yet, start with the cheapest two: &lt;strong&gt;one log format&lt;/strong&gt; and &lt;strong&gt;hard limits&lt;/strong&gt;. Everything else (the report, the review agent, the vetoes) builds on having reliable logs. Then add the review agent, because silent failures are the ones that cost you the most.&lt;/p&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Anthropic: &lt;a href=&quot;https://www.anthropic.com/engineering/building-effective-agents&quot;&gt;Building effective agents&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Claude Code: &lt;a href=&quot;https://code.claude.com/docs/en/headless&quot;&gt;Run Claude Code programmatically (headless)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Claude Code: &lt;a href=&quot;https://code.claude.com/docs/en/permissions&quot;&gt;Permissions&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Claude Code: &lt;a href=&quot;https://code.claude.com/docs/en/cli-reference&quot;&gt;CLI reference&lt;/a&gt; (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--max-turns&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--max-budget-usd&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--model&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--permission-mode&lt;/code&gt;)&lt;/li&gt;
  &lt;li&gt;Claude Code: &lt;a href=&quot;https://code.claude.com/docs/en/costs&quot;&gt;Manage costs&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;JSON Lines: &lt;a href=&quot;https://jsonlines.org/&quot;&gt;jsonlines.org&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Agentic Workflow Protocol: &lt;a href=&quot;https://agenticworkflowprotocol.org&quot;&gt;agenticworkflowprotocol.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Pantry Notes, its agents, numbers and log entries are invented for illustration.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">What&apos;s New in My Self-Built Dashboard: Bilingual UI, Safer Agents, Auto-Scans</title>
    <link href="https://blog.weisser.dev/blog/2026/10/03/servdash-whats-new-bilingual-agents-auto-scan/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-10-03T00:00:00+00:00</published>
    <updated>2026-10-03T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/10/03/servdash-whats-new-bilingual-agents-auto-scan/</id>
    <category term="operations" />
    <category term="ai" />
    <summary type="html">A day after I built my own Portainer with agents, the dashboard has already changed a lot. Using a tool every day is the fastest way to find what is missing, and most of what follows came from small irritations: a browser dialog that asked too little, a scan result that was quietly out of date, a...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/10/03/servdash-whats-new-bilingual-agents-auto-scan/">&lt;p&gt;A day after &lt;a href=&quot;/blog/2026/10/02/building-my-own-portainer-and-agents-with-ai/&quot;&gt;I built my own Portainer with agents&lt;/a&gt;, the dashboard has already changed a lot. Using a tool every day is the fastest way to find what is missing, and most of what follows came from small irritations: a browser dialog that asked too little, a scan result that was quietly out of date, a screenshot I could not share. This post is the follow-up: what is new, why, and what I learned. As before, all screenshots come from a demo mode with invented data. The names in them are made up.&lt;/p&gt;

&lt;h2 id=&quot;1-a-bilingual-interface&quot;&gt;1. A bilingual interface&lt;/h2&gt;

&lt;p&gt;The UI now switches between German and English with a toggle in the header (top right in every screenshot).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/servdash-v3-dashboard-en.png&quot; alt=&quot;The dashboard in English with the DE/EN toggle and the version in the sidebar&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I did this without an i18n framework. There is one dictionary of keys per language and a lookup helper. The part that matters is a test: it walks through every key used in the code and fails if one language has a key the other lacks, or if a key is used but defined nowhere. A missing translation is a silent bug, because nothing crashes and you only see it when you happen to switch language. A test that compares the two dictionaries costs almost nothing and catches exactly that.&lt;/p&gt;

&lt;p&gt;Dates and numbers follow the language too (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;4,7 GB&lt;/code&gt; versus &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;4.7 GB&lt;/code&gt;).&lt;/p&gt;

&lt;h2 id=&quot;2-descriptions-and-one-shot-containers&quot;&gt;2. Descriptions and one-shot containers&lt;/h2&gt;

&lt;p&gt;A dashboard that lists 18 containers should say what they are for. A container can now carry a Compose label:&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;labels&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;servdash.description&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Converts&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;uploaded&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;files&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;the&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;background&quot;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;servdash.oneshot&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;true&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The description is shown in the UI. The second label matters more than it looks. Some containers are meant to run, finish and exit: a migration, an index build, a job that a scheduler starts. Without more information, the dashboard sees &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exited&lt;/code&gt; and paints it red, as in the demo below. In the “Containers needing attention” list that is noise, and noise teaches you to ignore the list. With &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oneshot&lt;/code&gt;, an exit with code 0 is expected and not reported as a problem. An exit with a non-zero code still is.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/servdash-v3-containers-en.png&quot; alt=&quot;Containers: exited ones are highlighted as long as they are not marked as one-shot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To be honest about this screenshot: the three red &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tickets-*&lt;/code&gt; containers are exactly the case the label is for. If they are batch jobs, you mark them and the red goes away. If they are services, red is correct.&lt;/p&gt;

&lt;h2 id=&quot;3-a-real-dialog-instead-of-confirm&quot;&gt;3. A real dialog instead of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;confirm()&lt;/code&gt;&lt;/h2&gt;

&lt;p&gt;Starting an agent used to be a browser &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;confirm()&lt;/code&gt;: OK or Cancel. That is too little for something that may change code. The new dialog asks for what matters:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/servdash-v3-fixdialog-en.png&quot; alt=&quot;The &amp;quot;Fix with agent&amp;quot; dialog with mode, checkboxes and model&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Mode:&lt;/strong&gt; report only, triage, fix as a pull request, or fix directly on the default branch.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Checkboxes:&lt;/strong&gt; add or extend tests, watch logs and deployment after the push.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;100 % autonomous:&lt;/strong&gt; the agent gets the instruction not to ask questions, to decide itself and to record its decisions in the report.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Model&lt;/strong&gt;, and &lt;strong&gt;save as default&lt;/strong&gt; for future runs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The line under “autonomous” is the important one: &lt;em&gt;it does not change the push policy.&lt;/em&gt; Autonomy only decides whether the agent may ask questions. Whether it may push to the default branch follows solely from the chosen mode. And the “direct” mode stays tied to two conditions, which I described in the &lt;a href=&quot;/blog/2026/08/19/semver-and-conventional-commits-with-ai/&quot;&gt;SemVer post&lt;/a&gt;: the build must be green, and the change must be a minor or patch update. A major version bump is a breaking change by definition, so it always goes through a pull request. I want an agent that works without supervision, but I do not want one that can talk itself into pushing a major upgrade because nobody was there to ask.&lt;/p&gt;

&lt;h2 id=&quot;4-the-check-step-for-agents&quot;&gt;4. The “Check” step for agents&lt;/h2&gt;

&lt;p&gt;Agents are configured by prompts and by what they are allowed to run. Both are easy to get wrong, so there is now a &lt;strong&gt;Check&lt;/strong&gt; button next to an agent’s configuration. It asks a model to review the setup and returns four things:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;A rating of the prompt:&lt;/strong&gt; is it clear, does it contain contradictions, are stop conditions missing?&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A model recommendation with cost:&lt;/strong&gt; is the task worth the large model, or is a cheaper one enough? The cost is an estimate, shown as an estimate.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A list of the commands&lt;/strong&gt; the agent will probably use, each with a risk level.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A proposed &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;allowedTools&lt;/code&gt; list&lt;/strong&gt;, the allowlist of commands the agent may run without asking.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Nothing is applied automatically. A proposal becomes active only after I click “Apply”. I think this is the right split: the model is good at noticing that a prompt allows &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rm -rf&lt;/code&gt; somewhere, and I am the one who decides whether that is acceptable. A suggestion that changes permissions on its own would defeat the purpose of the exercise.&lt;/p&gt;

&lt;h2 id=&quot;5-hidden-mode-for-screenshots-demos-and-streams&quot;&gt;5. Hidden mode for screenshots, demos and streams&lt;/h2&gt;

&lt;p&gt;Triple-click the logo and the dashboard enters &lt;em&gt;hidden mode&lt;/em&gt;. Anything flagged as sensitive disappears from the lists, and a small crossed-out eye next to the logo shows that it is on. Compare the two security screenshots: the first has 7 targets, the second 6, because one flagged target is simply not there.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/servdash-v3-security-hid-en.png&quot; alt=&quot;Security view in hidden mode: one flagged target is gone, a crossed-out eye sits next to the logo&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Hidden mode is there so I can show the dashboard to someone, record a stream or take screenshots without checking each row first. It is a convenience for the audience in the room, not a security feature. The login still decides who can see anything at all.&lt;/p&gt;

&lt;h2 id=&quot;6-auto-scan-on-new-images-and-why-the-daily-scan-is-not-enough&quot;&gt;6. Auto-scan on new images, and why the daily scan is not enough&lt;/h2&gt;

&lt;p&gt;Until now, the CVE scan ran once a night. That sounds reasonable, until you look at what happened: I deployed several images after the scan, and the dashboard still showed the old state. The numbers were not wrong, they were out of date, and a security overview that shows yesterday’s picture gives false comfort exactly after you have changed something.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/servdash-v3-security-en.png&quot; alt=&quot;The security overview with the scan time and a &amp;quot;Scan now&amp;quot; button&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now the dashboard listens to Docker events. When an image is created or a container is started from a new image, a scan is scheduled. Three details make that work in practice:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Debouncing:&lt;/strong&gt; a deployment of five services produces a burst of events. The scan waits until it is quiet for a short while and then runs once.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A queue:&lt;/strong&gt; scans are heavy, and the host does not like parallel heavy work. Requests are queued and run one after another.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The nightly scan stays.&lt;/strong&gt; Events cover changes I make. They do not cover new vulnerabilities being published for an image that has not changed. That is what the daily run is for.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;7-a-blind-spot-in-frontend-findings&quot;&gt;7. A blind spot in frontend findings&lt;/h2&gt;

&lt;p&gt;A smaller finding with a real consequence: scanning a built &lt;em&gt;image&lt;/em&gt; of a frontend tells you very little. The bundle in the image contains compiled JavaScript but no &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;package.json&lt;/code&gt; or lock file, so there are no manifests for the scanner to read. The result looks clean and is just empty. This is why the overview scans repositories as well (the “Repositories (dependencies)” table), and why a repository without a committed lock file is shown as “lockfile missing” instead of “0 findings”. An honest “cannot check” is better than a green zero.&lt;/p&gt;

&lt;h2 id=&quot;8-a-version-in-the-sidebar&quot;&gt;8. A version in the sidebar&lt;/h2&gt;

&lt;p&gt;At the bottom of the sidebar the dashboard shows its own version, a short commit hash and the date. It follows SemVer, in the spirit of the post linked above. It sounds minor, but when I look at a screenshot or a bug report, I want to know in one second which build it came from.&lt;/p&gt;

&lt;h2 id=&quot;9-what-is-next-planned-not-built&quot;&gt;9. What is next (planned, not built)&lt;/h2&gt;

&lt;p&gt;These are plans, and none of them exists yet:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Backups and snapshots,&lt;/strong&gt; including restoring a server image from the dashboard.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Database backup and restore per table,&lt;/strong&gt; so that I can bring back one table without rolling back the whole database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Restoring is the dangerous direction, so I expect it to need the same care as the agents: a preview of what will be overwritten, an explicit confirmation, and a rollback path.&lt;/p&gt;

&lt;h2 id=&quot;lessons-learned&quot;&gt;Lessons learned&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;A missing translation is a silent bug.&lt;/strong&gt; A key test between the language files is cheap and catches it.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;“Exited” is not always an error.&lt;/strong&gt; If a tool cannot tell a finished job from a crash, the alert list becomes noise.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Autonomy and permission are different knobs.&lt;/strong&gt; “Do not ask me” must not mean “you may push anything.”&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Let the model suggest, let the human apply.&lt;/strong&gt; Especially for permission lists.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A security overview must say how fresh it is.&lt;/strong&gt; Trigger scans on change, and keep the periodic scan for what changes outside.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;An empty result can mean “not checked.”&lt;/strong&gt; Show that difference.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Build the demo mode early.&lt;/strong&gt; It made every screenshot in this post possible without exposing anything real.&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">Letting an AI Agent Run My Homelab — and Why That&apos;s Nothing Special</title>
    <link href="https://blog.weisser.dev/blog/2026/10/02/guardrails-for-ops-agents/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-10-02T00:00:00+00:00</published>
    <updated>2026-10-02T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/10/02/guardrails-for-ops-agents/</id>
    <category term="operations" />
    <category term="ai" />
    <summary type="html">My homelab now has agents. One reads logs and explains what went wrong. One runs every 15 minutes and checks whether everything is healthy — and if not, tries to fix it. One looks at CVE scan results and bumps vulnerable dependencies in my own projects. All of them are Claude Code running headles...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/10/02/guardrails-for-ops-agents/">&lt;p&gt;My homelab now has agents. One reads logs and explains what went wrong. One runs every 15 minutes and checks whether everything is healthy — and if not, tries to fix it. One looks at CVE scan results and bumps vulnerable dependencies in my own projects. All of them are &lt;a href=&quot;https://claude.com/claude-code&quot;&gt;Claude Code&lt;/a&gt; running headless (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;claude -p&lt;/code&gt;), started from my self-built dashboard.&lt;/p&gt;

&lt;p&gt;The obvious question: isn’t it insane to let an LLM loose on a server? My answer: it would be — if you gave it a root shell and walked away. But that’s not how you run &lt;em&gt;any&lt;/em&gt; automation, and it’s not how I run this one either.&lt;/p&gt;

&lt;h2 id=&quot;the-setup-in-one-paragraph&quot;&gt;The setup in one paragraph&lt;/h2&gt;

&lt;p&gt;A tiny service (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;agentd&lt;/code&gt;, ~300 lines of Node, no dependencies) sits next to the Docker host. My dashboard talks to it over HTTP with a bearer token; the dashboard itself sits behind a login. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;agentd&lt;/code&gt; starts agent runs, keeps schedules, and stores every run on disk. Each agent is defined in a small JSON file: a name, a default task, whether it’s read-only, and a shared set of rules. That’s the whole architecture.&lt;/p&gt;

&lt;h2 id=&quot;layer-1-a-narrow-job-written-down&quot;&gt;Layer 1: A narrow job, written down&lt;/h2&gt;

&lt;p&gt;Every agent gets exactly one job. The log agent’s prompt says: &lt;em&gt;fetch the logs for this container, group the errors by cause, rate them, suggest fixes — change nothing.&lt;/em&gt; The repair agent’s prompt says: &lt;em&gt;check containers, recent errors, disk space and public endpoints; if all is fine say so in three lines, otherwise find the cause and fix it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On top of that, every run gets the same appended system prompt with the house rules:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Changes to apps, compose files, proxy config or workflows &lt;strong&gt;only via Git&lt;/strong&gt;: clone, change, commit, push — the CI runner deploys. Never edit things directly on the server.&lt;/li&gt;
  &lt;li&gt;Allowed without Git: reading logs and status, restarting a single container.&lt;/li&gt;
  &lt;li&gt;Forbidden: deleting data, force-pushing, printing secrets, changing what’s publicly reachable, rebooting hosts, installing packages.&lt;/li&gt;
  &lt;li&gt;If a fix is risky or unclear: change nothing, report.&lt;/li&gt;
  &lt;li&gt;End every run with the same three sections: &lt;em&gt;Findings&lt;/em&gt;, &lt;em&gt;Actions&lt;/em&gt; (with commit links), &lt;em&gt;Open points&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because the agent runs in a working directory below my home folder, it also automatically loads the same &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AGENTS.md&lt;/code&gt; that I keep for every other assistant. It knows how the infrastructure is laid out, where things live and &lt;em&gt;how changes are supposed to happen here&lt;/em&gt; — the same onboarding a new colleague would get.&lt;/p&gt;

&lt;p&gt;A prompt is not a security boundary, though. It’s the job description. So there are more layers.&lt;/p&gt;

&lt;h2 id=&quot;layer-2-every-action-is-reviewed-before-it-runs&quot;&gt;Layer 2: Every action is reviewed before it runs&lt;/h2&gt;

&lt;p&gt;The agents run with Claude Code’s &lt;strong&gt;auto permission mode&lt;/strong&gt;. In this mode a separate safety classifier looks at each action &lt;em&gt;before&lt;/em&gt; it executes and blocks the ones that are destructive, irreversible or outside what the task asked for. I didn’t take that on faith: while building this setup, my own interactive session tried to flip a service from private to public through an API call — and got stopped, because changing public exposure is exactly the kind of thing that should stay a human decision. That’s the behaviour I want for an unattended agent, too.&lt;/p&gt;

&lt;h2 id=&quot;layer-3-a-hard-deny-list&quot;&gt;Layer 3: A hard deny list&lt;/h2&gt;

&lt;p&gt;The classifier is smart; a deny list is dumb and therefore predictable. Every run starts with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--disallowedTools&lt;/code&gt; for the commands that should never be needed: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rm -rf&lt;/code&gt;, removing or pruning Docker volumes, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git push --force&lt;/code&gt;, reboot and shutdown, destroying or stopping containers at the hypervisor level, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mkfs&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt;, package managers. Read-only agents additionally lose the ability to edit files, commit and push. The log agent can look at everything and touch nothing.&lt;/p&gt;

&lt;h2 id=&quot;layer-4-git-is-the-only-way-in&quot;&gt;Layer 4: Git is the only way in&lt;/h2&gt;

&lt;p&gt;This is the most important one, and it isn’t AI-specific at all. My rule for &lt;em&gt;myself&lt;/em&gt; is that nothing gets changed on the server by hand — every change is a commit, and a self-hosted runner deploys it. The agents follow the same rule.&lt;/p&gt;

&lt;p&gt;That gives me everything I’d want from a change process for free:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;An audit trail&lt;/strong&gt;: every change is a commit with a trailer that marks it as agent-made.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A diff&lt;/strong&gt; I can read afterwards.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A one-command rollback&lt;/strong&gt;: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git revert&lt;/code&gt;, push, done.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The same deploy path&lt;/strong&gt; as human changes, so there’s no “agent-only” way of changing production.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;layer-5-blast-radius&quot;&gt;Layer 5: Blast radius&lt;/h2&gt;

&lt;p&gt;At most two agents run at the same time, a scheduled agent never overlaps with itself, and every run can be cancelled from the dashboard. Secrets never get handed to the model as text. When the CVE scanner needs GitHub access to scan private repositories, the token is written to a temporary file for the duration of that one scan and deleted afterwards.&lt;/p&gt;

&lt;h2 id=&quot;the-extra-watchdog-the-dashboard-itself&quot;&gt;The extra watchdog: the dashboard itself&lt;/h2&gt;

&lt;p&gt;Agents report what they did. I don’t rely on that alone.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Every run is fully recorded.&lt;/strong&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;agentd&lt;/code&gt; stores the complete event stream: every tool call, every command, every output. The dashboard shows it live while the agent works, and afterwards as a readable timeline. If an agent claims “restarted the container”, I can see the exact command it ran.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The dashboard is independent of the agents.&lt;/strong&gt; Container health, restarts, crashes in the last 24 hours, disk usage, CVE counts and endpoint reachability come from Docker and the scanners directly, not from the agent’s summary. If the repair agent says “all good” while a container is crash-looping, the dashboard shows the contradiction.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;GitHub is the second record.&lt;/strong&gt; Anything the agent changed is a commit in a repository, visible in the normal history, on a different system than the one the agent works on.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;why-this-is-nothing-special&quot;&gt;Why this is nothing special&lt;/h2&gt;

&lt;p&gt;Strip away the “AI” label and look at what’s actually there:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A &lt;strong&gt;bot account with a narrow job&lt;/strong&gt; — like Dependabot or Renovate.&lt;/li&gt;
  &lt;li&gt;A &lt;strong&gt;runbook&lt;/strong&gt; it follows — like any on-call automation.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Least privilege&lt;/strong&gt; — a read-only role for analysis, a restricted role for fixes.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Changes through version control and CI&lt;/strong&gt; — like every deployment pipeline of the last decade.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Audit logs, a kill switch and a limited blast radius&lt;/strong&gt; — like any cron job you’d let near production.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these ideas are new. We’ve been letting scripts, CI pipelines and bots act on production systems for years, and the playbook for doing that safely is well known. An agent is a more capable script that also explains itself. It deserves the same treatment as any other automation: clear scope, limited permissions, every change reviewable and revertable. Not blind trust, not panic.&lt;/p&gt;

&lt;h2 id=&quot;whats-not-perfect-yet&quot;&gt;What’s not perfect (yet)&lt;/h2&gt;

&lt;p&gt;To be honest about the current state:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The agents run on the hypervisor host because that’s where Claude Code is logged in, and they inherit that user’s rights. The layers above constrain what they &lt;em&gt;do&lt;/em&gt;; they’re not a sandbox. Next step: a dedicated system user with an explicit allow-list of commands.&lt;/li&gt;
  &lt;li&gt;For anything non-trivial, the agents should push to a branch and open a pull request instead of pushing to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt;. Small, mechanical fixes (a dependency bump with a green build) are fine to land directly. A refactor isn’t.&lt;/li&gt;
  &lt;li&gt;There’s no hard time or turn limit per run yet. A stuck run has to be cancelled by hand.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these are blockers for a homelab. They’re the same backlog items you’d write down for any new piece of automation — which is exactly the point.&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">I Built My Own Portainer — Plus Agents — in a Single Day With AI</title>
    <link href="https://blog.weisser.dev/blog/2026/10/02/building-my-own-portainer-and-agents-with-ai/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-10-02T00:00:00+00:00</published>
    <updated>2026-10-02T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/10/02/building-my-own-portainer-and-agents-with-ai/</id>
    <category term="operations" />
    <category term="ai" />
    <summary type="html">My homelab is one Proxmox host, one Docker host and a growing pile of containers: a few services I build myself, a lot of public images, static sites, a database cluster. Portainer showed me containers, but it knew nothing about my setup — which hostname is public and which is LAN-only, which con...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/10/02/building-my-own-portainer-and-agents-with-ai/">&lt;p&gt;My homelab is one Proxmox host, one Docker host and a growing pile of containers: a few services I build myself, a lot of public images, static sites, a database cluster. Portainer showed me containers, but it knew nothing about &lt;em&gt;my&lt;/em&gt; setup — which hostname is public and which is LAN-only, which container belongs to which Git repo, when something was last deployed, whether a backend is even needed right now.&lt;/p&gt;

&lt;p&gt;So I built the dashboard I actually wanted. The first commit landed at noon; by the evening it was running in production, with about 6,700 lines of JavaScript, CSS and HTML, 26 tests and no database. I wrote almost none of that code myself — I described outcomes, the AI built and verified them, and several AI agents worked in parallel. This post is about what came out, how the work went, and what went wrong on the way. (All screenshots are from a demo mode with invented data — none of my real apps are in them.)&lt;/p&gt;

&lt;h2 id=&quot;what-it-does&quot;&gt;What it does&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A dashboard that knows the host.&lt;/strong&gt; CPU, memory, disks (fast and slow), GPU, and everything that crashed in the last 24 hours — in one glance, updating live.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/dashboard.png&quot; alt=&quot;The dashboard with host load, GPU and container counts&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stacks and containers, sorted by how they are maintained.&lt;/strong&gt; Things I build myself are separated from public images. Public images get a per-image &lt;em&gt;auto-update&lt;/em&gt; switch (a nightly job asks Watchtower to update exactly the images I enabled). Every stack links to its Git repo and shows &lt;em&gt;when it was last deployed&lt;/em&gt;. Start, stop, restart and a 48-hour log viewer with export are one click away.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/stacks.png&quot; alt=&quot;Stacks, sorted by own builds and public images&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-time numbers without paying for them.&lt;/strong&gt; The obvious way to get per-container CPU and memory is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docker stats&lt;/code&gt;, and it is surprisingly expensive: each call takes one to two seconds per container and keeps the Docker daemon busy. The dashboard reads the cgroup counters straight from the filesystem instead — a handful of tiny file reads per container — and pushes updates to the browser every two seconds over Server-Sent Events, but only while somebody is actually watching.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/system.png&quot; alt=&quot;System view with live CPU, memory, network and disk charts&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One place for “what is reachable”.&lt;/strong&gt; Docker apps behind the reverse proxy, static sites, external sites, internal services — each with type, whether it is public or LAN-only, how to reach it, the repo and the last deploy. Public/private is a switch; after flipping it, the dashboard polls from the outside until the new state is &lt;em&gt;confirmed&lt;/em&gt;, instead of hoping.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/exposure.png&quot; alt=&quot;The reachability overview with public/private switches&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backends that sleep until needed.&lt;/strong&gt; A multi-service backend that is used a few times a day does not need to hold memory and CPU all day. A small proxy inside the dashboard receives the requests, starts the stack if it is asleep, &lt;strong&gt;holds the request&lt;/strong&gt; until the services answer, and then forwards it — no timeouts, WebSockets included. After a configurable idle time the stack goes back to sleep. I measured a cold start of about 34 seconds for five Java services; the first request simply waits that long and succeeds. Details that mattered: health checks from outside monitors don’t count as activity (and are answered by the proxy while the stack sleeps), and an &lt;em&gt;activity guard&lt;/em&gt; keeps a stack awake while its containers are busy, even without HTTP traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A login gate for apps that have no login.&lt;/strong&gt; Some tools (a converter UI, a download client) have no authentication at all. One reverse-proxy snippet — &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;forward_auth&lt;/code&gt; against the dashboard — puts them behind a single login, domain-wide, with a safe redirect back to where you came from.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agents that read logs and chase CVEs.&lt;/strong&gt; This is the part I like most:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/agents.png&quot; alt=&quot;The agents view with schedules and runs&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The &lt;strong&gt;log agent&lt;/strong&gt; can analyze logs, hunt for &lt;em&gt;anomalies&lt;/em&gt; (comparing against the hours before), or tune the Docker Compose files from real measurements and propose changes as a pull request.&lt;/li&gt;
  &lt;li&gt;The &lt;strong&gt;CVE agent&lt;/strong&gt; works on Trivy scan results and has four modes: &lt;em&gt;only find&lt;/em&gt;, &lt;em&gt;triage&lt;/em&gt; (is the vulnerable package even used at runtime?), &lt;em&gt;fix as pull request&lt;/em&gt;, or &lt;em&gt;fix directly on the default branch&lt;/em&gt; after a green build. Before a mode that changes anything, it checks that GitHub is reachable and writable — otherwise the run quietly downgrades to read-only.&lt;/li&gt;
  &lt;li&gt;Everything is &lt;strong&gt;configurable in the UI&lt;/strong&gt;: modes, model, time limit, prompts (templates with placeholders), repositories, schedules, even the command prefix used to reach Docker — so the same setup runs on a different machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/security.png&quot; alt=&quot;CVE overview with triage and fix modes&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A real example of why the triage mode is worth it: on one old React site the scanner reported 79 critical and high findings, three of them critical. The agent read the code and the build setup and classified almost all of them as &lt;em&gt;build or dev tooling that never ships to a browser&lt;/em&gt; — overall risk low — and listed the few fixes that actually matter. That is the report I would have wanted from a colleague — delivered in minutes.&lt;/p&gt;

&lt;p&gt;(How I keep such agents inside their lane is the subject of &lt;a href=&quot;/blog/2026/10/02/guardrails-for-ops-agents/&quot;&gt;the previous post&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Settings for everything.&lt;/strong&gt; Refresh intervals, live metrics, auto-update hour, sleep defaults, agent behavior — one page, no code changes.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/servdash/settings.png&quot; alt=&quot;The settings page&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;how-i-worked-with-the-ai&quot;&gt;How I worked with the AI&lt;/h2&gt;

&lt;p&gt;I barely touched an editor for the dashboard. The loop looked like this:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Describe the outcome in plain sentences&lt;/strong&gt;, including the annoying parts (“it must not time out while the backend starts”), and let the AI write a short spec into the repo’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AGENTS.md&lt;/code&gt; first.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Let the AI build in small steps&lt;/strong&gt; — commit, push, deploy by CI, then &lt;em&gt;verify live&lt;/em&gt;: log in with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;curl&lt;/code&gt;, call the new endpoints, check the response shape, run the tests. “It compiles” never counted as done.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Use parallel agents for independent work.&lt;/strong&gt; For the larger session behind this post I ran six sub-agents at once — storage and migrations, CVE fixes, the reverse proxy, the blog structure, hosting switches, a media pipeline — each with the same briefing file (the rules: everything through Git, no secrets in output, verify before reporting) and its own area of the code.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Keep a single source of truth for context&lt;/strong&gt;: an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AGENTS.md&lt;/code&gt; that every agent loads. It is boring and it is the reason the agents don’t re-discover the same lessons.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;what-went-wrong-and-what-i-learned&quot;&gt;What went wrong (and what I learned)&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;The dashboard said “public” for something that was private.&lt;/strong&gt; The status was derived from &lt;em&gt;which folder a config file sits in&lt;/em&gt; — and a deploy from Git quietly put the file back. The fix: the truth is &lt;em&gt;the tunnel rule&lt;/em&gt;, i.e. what is actually reachable, not what a file says. Derive state from reality.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;“The dashboard is slow” was not the dashboard.&lt;/strong&gt; Three video conversions and several parallel builds had saturated a single slow hard disk (a disk benchmark showed about 8 durable writes per second versus 444 on the SSD). Fixes: databases on the SSD, heavy jobs serialized with a lock, CPU caps for the converter, and &lt;em&gt;stale-while-revalidate&lt;/em&gt; caching with background warm-up so the UI never waits for an expensive query.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Moving the container storage while containers were running&lt;/strong&gt; left them writing to the old, deleted path. Uploads failed for about an hour; the log agent surfaced the symptom, and the cause turned out to be my own storage move. Lesson: after a migration, test with a &lt;em&gt;write&lt;/em&gt;, not an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ls&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Even screenshots took a detour.&lt;/strong&gt; Headless Chrome’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--screenshot&lt;/code&gt; produced blank pages for a page with a live event stream; driving the browser over its DevTools protocol fixed it — and gave better, full-height images as a bonus.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;things-worth-stealing&quot;&gt;Things worth stealing&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;No database.&lt;/strong&gt; JSON files next to the container are enough for settings and sleep state, and make the thing trivial to move.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Git is the source of truth for configuration; reality is the source of truth for state.&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Measure cheaply.&lt;/strong&gt; Read what the kernel already counts.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Degrade gracefully.&lt;/strong&gt; If GitHub is down, the agent still reports; if the tunnel API is unreachable, the status says “unknown” instead of lying.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Use the AI for the verification, not just the code.&lt;/strong&gt; The most valuable agent runs were the ones that checked other work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The dashboard is not open source (yet), and it is very much shaped around my own setup. But the pieces — cgroup-based metrics, a request-holding wake proxy, a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;forward_auth&lt;/code&gt; gate, mode-based agents with a GitHub pre-check — are small enough to build yourself in an afternoon. Today, I was reminded how short “an afternoon” has become.&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">Long-running AI agents: progress files, clean states, checkpoints</title>
    <link href="https://blog.weisser.dev/blog/2026/08/20/long-running-agents/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-08-20T00:00:00+00:00</published>
    <updated>2026-08-20T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/08/20/long-running-agents/</id>
    <category term="ai" />
    <category term="agents" />
    <summary type="html">Long-running AI agents need memory that lives outside the model. When work spans many context windows, each new session starts blank, so the harness must hand it a feature list, a progress file and version-control history to read first, and require it to leave a clean state when it stops. This pa...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/08/20/long-running-agents/">&lt;p&gt;Long-running AI agents need memory that lives outside the model. When work spans many context windows, each new session starts blank, so the harness must hand it a feature list, a progress file and version-control history to read first, and require it to leave a clean state when it stops. This pattern makes work resumable after a crash, reviewable by a person and auditable afterwards. This post explains the pattern and how to adapt it.&lt;/p&gt;

&lt;h2 id=&quot;the-problem-many-sessions-no-memory&quot;&gt;The problem: many sessions, no memory&lt;/h2&gt;

&lt;p&gt;A context window is finite. A task such as “build this application” or “migrate this codebase” takes far more steps than fit into one. The agent works until the window fills, then a new session begins with no recollection of what happened. Anthropic’s engineering team states the difficulty plainly:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;However, getting agents to make consistent progress across multiple context windows remains an open problem.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents&quot;&gt;Effective harnesses for long-running agents, Anthropic&lt;/a&gt;. Two failure patterns follow. The agent may try to do everything at once and run out of context halfway, leaving half-finished work. Or a later session may look at the partial result, assume the job is done and stop early. Both are consequences of missing state, not of a weak model.&lt;/p&gt;

&lt;h2 id=&quot;the-pattern-state-in-files-and-commits&quot;&gt;The pattern: state in files and commits&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/agents/long-running-agents-1.svg&quot; alt=&quot;Chain of agent sessions sharing state through files and commits&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The pattern has two kinds of sessions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session 1 (setup).&lt;/strong&gt; An initialiser session creates the scaffolding that later sessions rely on:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A &lt;strong&gt;feature list&lt;/strong&gt;: a structured file with every requirement, each marked as not done or done.&lt;/li&gt;
  &lt;li&gt;A &lt;strong&gt;progress file&lt;/strong&gt;: short notes on what has been tried, what works and what to do next.&lt;/li&gt;
  &lt;li&gt;A &lt;strong&gt;first commit&lt;/strong&gt; and a script to start the project and run its tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Sessions 2 to n (work).&lt;/strong&gt; Each later session follows the same loop:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Read the progress file and the recent git log.&lt;/li&gt;
  &lt;li&gt;Run the start script and the tests to check the current state.&lt;/li&gt;
  &lt;li&gt;Pick &lt;strong&gt;one&lt;/strong&gt; unfinished item from the feature list.&lt;/li&gt;
  &lt;li&gt;Implement it and verify it.&lt;/li&gt;
  &lt;li&gt;Commit, update the progress file, and mark the item done only after verification.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same article explains why the “one item” rule matters:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;This incremental approach turned out to be critical to addressing the agent’s tendency to do too much at once.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In short, the smaller the unit of work, the cheaper it is to check, to revert and to resume.&lt;/p&gt;

&lt;h2 id=&quot;what-goes-in-the-files&quot;&gt;What goes in the files&lt;/h2&gt;

&lt;p&gt;Keep the feature list machine-readable and hard to misuse. A JSON or YAML file with fixed fields works well:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;features&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;F-012&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;description&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;User can reset their password by e-mail&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;steps&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;open reset form&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;submit address&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;follow link&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;set new password&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;passes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Rules for the file that the harness can enforce:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Sessions may flip &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;passes&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;true&lt;/code&gt; only after the verification step ran.&lt;/li&gt;
  &lt;li&gt;Sessions must not delete or reword items; they may add new ones.&lt;/li&gt;
  &lt;li&gt;The harness, not the model, validates the file’s schema before accepting a commit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The progress file can be free text, but keep it short and dated. Entries answer three questions: what changed, what is known to be broken, what comes next. Treat it as a hand-over note to a colleague who has never seen the project.&lt;/p&gt;

&lt;h2 id=&quot;the-clean-state-rule&quot;&gt;The clean-state rule&lt;/h2&gt;

&lt;p&gt;A session should end with the repository in a state the next session can work from: tests pass or known failures are recorded, nothing is half-merged, notes are updated. Define this as an exit check in the harness:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-euo&lt;/span&gt; pipefail
git diff &lt;span class=&quot;nt&quot;&gt;--quiet&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;uncommitted changes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;1&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
./scripts/test.sh
&lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; PROGRESS.md
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If the check fails, the session is not finished. Either the agent continues to fix it, or the harness reverts to the last good commit. Version control gives you cheap checkpoints: each commit is a point you can return to.&lt;/p&gt;

&lt;h2 id=&quot;connection-to-the-agent-loop&quot;&gt;Connection to the agent loop&lt;/h2&gt;

&lt;p&gt;Anthropic’s article on the Claude Agent SDK describes the basic cycle:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Agents often operate in a specific feedback loop: gather context -&amp;gt; take action -&amp;gt; verify work -&amp;gt; repeat.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk&quot;&gt;Building agents with the Claude Agent SDK, Anthropic&lt;/a&gt;. In a long-running setup, the files and the git log are the “gather context” step at the start of each session, and verification is what allows the next session to trust the previous one. For how context is managed within a single window, see &lt;a href=&quot;/blog/2026/04/07/context-engineering-basics/&quot;&gt;context engineering basics&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;an-example-of-long-horizon-autonomy&quot;&gt;An example of long-horizon autonomy&lt;/h2&gt;

&lt;p&gt;Anthropic’s Project Vend experiment ran an agent as the operator of a small shop. The write-up describes the agent’s remit:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Claudius decided what to stock, how to price its inventory, when to restock (or stop selling) items, and how to reply to customers&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://www.anthropic.com/research/project-vend-1&quot;&gt;Project Vend: Can Claude run a small shop? (And why does that matter?), Anthropic&lt;/a&gt;. Work like this runs for days and involves recurring decisions, which is exactly the setting where state outside the model, clear records and human oversight matter. Read the original for its results; it describes real mistakes as well as successes, which is a useful reminder that long horizons expose weaknesses that short tests do not.&lt;/p&gt;

&lt;h2 id=&quot;making-runs-resumable-and-auditable&quot;&gt;Making runs resumable and auditable&lt;/h2&gt;

&lt;p&gt;The same files that help the agent also serve operators:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Resumable.&lt;/strong&gt; After a crash or a deploy, the harness starts a new session pointing at the same repository. No special recovery code is needed beyond “read the state”.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Auditable.&lt;/strong&gt; Commits, with messages that name the feature id, form a timeline of what changed and why. Store the session id and model version in the commit trailer or the run record.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Reviewable.&lt;/strong&gt; A person can review one commit per feature instead of one enormous diff.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Bounded.&lt;/strong&gt; Add a per-session step or token limit and a total budget. A loop that never finishes should stop and ask for help.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;limits&quot;&gt;Limits&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;The pattern assumes work can be split into verifiable items. Open-ended research or design tasks fit less well; there, a progress file with decisions and open questions plays the role of the feature list.&lt;/li&gt;
  &lt;li&gt;Verification quality caps overall quality. If the tests are weak, “passes: true” is weak too.&lt;/li&gt;
  &lt;li&gt;Notes can rot. Have sessions prune and rewrite the progress file instead of only appending.&lt;/li&gt;
  &lt;li&gt;State files are untrusted input in one respect: if they can be edited by anyone other than the harness and agent, treat their content as data, not instructions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;key-takeaways&quot;&gt;Key takeaways&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Sessions start blank; keep state in a feature list, a progress file and git history.&lt;/li&gt;
  &lt;li&gt;One item per session, verified before it is marked done.&lt;/li&gt;
  &lt;li&gt;End every session in a clean state, enforced by a harness-side exit check.&lt;/li&gt;
  &lt;li&gt;Commits are cheap checkpoints that make runs resumable, reviewable and auditable.&lt;/li&gt;
  &lt;li&gt;Bound the whole thing with step, token and budget limits.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents&quot;&gt;Effective harnesses for long-running agents (Anthropic, 2025-11-26)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk&quot;&gt;Building agents with the Claude Agent SDK (Anthropic, 2025-09-29)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.anthropic.com/research/project-vend-1&quot;&gt;Project Vend: Can Claude run a small shop? (Anthropic, 2025-06-27)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;First published on the open-agentix blog.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">Why SemVer and Conventional Commits Matter Even More with AI-Assisted Coding</title>
    <link href="https://blog.weisser.dev/blog/2026/08/19/semver-and-conventional-commits-with-ai/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-08-19T00:00:00+00:00</published>
    <updated>2026-08-19T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/08/19/semver-and-conventional-commits-with-ai/</id>
    <category term="development" />
    <category term="ai" />
    <summary type="html">When agents write code, the number of commits goes up. Not by a little: an agent that works through a task in small steps can produce a dozen commits in the time it takes me to make coffee. That is great for throughput and terrible for anyone who has to read the result later, including me, my rev...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/08/19/semver-and-conventional-commits-with-ai/">&lt;p&gt;When agents write code, the number of commits goes up. Not by a little: an agent that works through a task in small steps can produce a dozen commits in the time it takes me to make coffee. That is great for throughput and terrible for anyone who has to read the result later, including me, my reviewers, and every tool that tries to make sense of the history.&lt;/p&gt;

&lt;p&gt;I let agents write a lot of code these days, and two old, boring conventions have turned out to be the most useful guardrails I have: &lt;a href=&quot;https://semver.org&quot;&gt;Semantic Versioning&lt;/a&gt; and &lt;a href=&quot;https://www.conventionalcommits.org/en/v1.0.0/&quot;&gt;Conventional Commits&lt;/a&gt;. This post explains why they matter more with agents than without, and how I set them up.&lt;/p&gt;

&lt;h2 id=&quot;the-problem-fast-commits-unreadable-history&quot;&gt;The problem: fast commits, unreadable history&lt;/h2&gt;

&lt;p&gt;Left alone, an agent (and honestly, a tired human) produces a history like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;update
fix stuff
wip
more changes
fix tests
final
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Every one of those messages is technically true and completely useless. Concretely, this hurts in four places:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Review.&lt;/strong&gt; A reviewer opens a pull request with 25 commits. Without a convention they cannot tell which commit is a feature, which is a refactor and which is a lucky bugfix. They read everything or they skim, and both are bad.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Bisecting.&lt;/strong&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git bisect&lt;/code&gt; only helps if commits are small and each one does one thing.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Releases.&lt;/strong&gt; “What changed since the last version?” turns into guesswork. Release notes get written from memory, or not at all.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Rollbacks.&lt;/strong&gt; If a commit mixes a feature, a rename and a dependency bump, you cannot revert one without the others.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this is new. What is new is the rate. A human produces a few commits per day; an agent produces dozens, and nobody reads all of them carefully. The history needs to be readable &lt;em&gt;by structure&lt;/em&gt;, not just by effort.&lt;/p&gt;

&lt;h2 id=&quot;conventional-commits-an-interface-between-human-agent-and-tooling&quot;&gt;Conventional Commits: an interface between human, agent and tooling&lt;/h2&gt;

&lt;p&gt;Conventional Commits is a small format for the commit message:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;type&amp;gt;[optional scope][!]: &amp;lt;description&amp;gt;

[optional body]

[optional footer(s)]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A few examples:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;feat(auth): add refresh token rotation
fix(parser): handle empty input without throwing
docs: explain the retry policy in the README
refactor(api)!: rename /v1/items to /v1/products

BREAKING CHANGE: clients must use the new path; the old one returns 410.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The common types are &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feat&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fix&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docs&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;refactor&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;perf&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;test&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;build&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ci&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chore&lt;/code&gt;. The scope is optional and names the area that changed. A &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;!&lt;/code&gt; after the type or scope, or a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BREAKING CHANGE:&lt;/code&gt; footer, marks an incompatible change.&lt;/p&gt;

&lt;p&gt;Why is this such a good fit for agents?&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;It is machine-readable.&lt;/strong&gt; Changelogs, release notes and version bumps can be generated from the history instead of written by hand.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;It is easy to follow reliably.&lt;/strong&gt; Agents are good at following a clear, narrow format when you state it explicitly. “Write a good commit message” is vague; “use Conventional Commits, one change per commit” is checkable.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;It forces a decision.&lt;/strong&gt; To pick a type, the agent (or human) has to decide what the change actually is. A commit that cannot be classified is usually a commit that does too much.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;It gives reviewers a map.&lt;/strong&gt; In a long PR, the type and scope tell me where to look first: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fix&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feat&lt;/code&gt; get attention, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docs&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;test&lt;/code&gt; get a skim.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;type-to-semver-effect&quot;&gt;Type to SemVer effect&lt;/h3&gt;

&lt;p&gt;This is the mapping I use:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Commit type&lt;/th&gt;
      &lt;th&gt;Example&lt;/th&gt;
      &lt;th&gt;Version bump&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fix&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fix(db): close connection on timeout&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;PATCH (1.4.2 to 1.4.3)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feat&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feat(api): add pagination&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;MINOR (1.4.2 to 1.5.0)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;any type with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;!&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BREAKING CHANGE:&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;refactor(api)!: drop v1 routes&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;MAJOR (1.4.2 to 2.0.0)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;perf&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;perf(search): cache index lookups&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;usually PATCH&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docs&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;test&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ci&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;build&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chore&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;refactor&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docs: fix typo&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;no release by default&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The Conventional Commits specification itself only fixes &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fix&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feat&lt;/code&gt; and the breaking marker; the others are widely used conventions. How &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;perf&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;build&lt;/code&gt; affect versions is a team decision, and I write it down.&lt;/p&gt;

&lt;h2 id=&quot;semver-a-contract-that-makes-decisions-possible&quot;&gt;SemVer: a contract that makes decisions possible&lt;/h2&gt;

&lt;p&gt;Semantic Versioning says a version is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MAJOR.MINOR.PATCH&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;PATCH:&lt;/strong&gt; backwards-compatible bug fixes.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;MINOR:&lt;/strong&gt; backwards-compatible new functionality.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;MAJOR:&lt;/strong&gt; incompatible changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point is not the numbers, it is the &lt;em&gt;promise&lt;/em&gt;. A version number is a statement about risk: “you can upgrade to this without breaking things” or “read the notes first”.&lt;/p&gt;

&lt;h3 id=&quot;why-this-gets-more-important-with-agents&quot;&gt;Why this gets more important with agents&lt;/h3&gt;

&lt;p&gt;I run agents that look at vulnerability scans and update dependencies. The rule I gave them is simple: minor and patch updates may be applied directly if the build and tests pass; major updates only as a pull request for a human to review.&lt;/p&gt;

&lt;p&gt;That rule is only &lt;em&gt;decidable&lt;/em&gt; because of SemVer. Without a shared meaning of “major”, an agent has no principled way to tell a safe update from a risky one. With it, the check is mechanical: compare the version before and after, and look at which component changed.&lt;/p&gt;

&lt;p&gt;There are three more reasons SemVer pays off in an agent workflow:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Rollbacks are cheap.&lt;/strong&gt; A tag like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1.5.0&lt;/code&gt; is a named, known-good point. If an agent-made change goes wrong, “go back to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1.4.3&lt;/code&gt;” is an unambiguous instruction for a human, a deploy pipeline or another agent.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Breaking changes get communicated.&lt;/strong&gt; Agents refactor confidently, and sometimes they change a public interface without noticing it is public. A convention that says “breaking means &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;!&lt;/code&gt; plus a footer” turns that into something a hook or a reviewer can check.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Consumers can trust upgrades.&lt;/strong&gt; If you publish a library, an API or even a CLI, other people (and their agents) will decide automatically whether to upgrade. Your version number is the input to that decision.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;a-practical-setup&quot;&gt;A practical setup&lt;/h2&gt;

&lt;p&gt;Here is what I actually put in place. None of it is fancy.&lt;/p&gt;

&lt;h3 id=&quot;1-a-rule-in-agentsmd&quot;&gt;1. A rule in AGENTS.md&lt;/h3&gt;

&lt;p&gt;Agents read their instructions at the start of a task, so this is the first and cheapest lever:&lt;/p&gt;

&lt;div class=&quot;language-markdown highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gu&quot;&gt;## Commits&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; Use Conventional Commits: &lt;span class=&quot;sb&quot;&gt;`&amp;lt;type&amp;gt;(&amp;lt;scope&amp;gt;): &amp;lt;description&amp;gt;`&lt;/span&gt;.
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; Allowed types: feat, fix, docs, refactor, perf, test, build, ci, chore.
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; One commit = one change. Do not mix a feature, a refactor and a
  dependency bump in one commit.
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; Mark incompatible changes with &lt;span class=&quot;sb&quot;&gt;`!`&lt;/span&gt; and a &lt;span class=&quot;sb&quot;&gt;`BREAKING CHANGE:`&lt;/span&gt; footer.
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; Imperative, lower-case description, no trailing period, max 72 characters.
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; Never force-push. Never rewrite published history.
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; Commit under the configured git identity. No promotional or
  attribution lines in commit messages.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;2-a-commit-msg-hook&quot;&gt;2. A commit-msg hook&lt;/h3&gt;

&lt;p&gt;Instructions are a request; a hook is a check. This is a minimal &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.git/hooks/commit-msg&lt;/code&gt; (or the equivalent in your hook manager):&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;msg_file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;first_line&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;head&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-n1&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$msg_file&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;pattern&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;^(feat|fix|docs|refactor|perf|test|build|ci|chore|revert)(\([a-z0-9._-]+\))?!?: .{1,72}$&apos;&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Let merge and revert commits generated by git through.&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$first_line&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;Merge&lt;span class=&quot;se&quot;&gt;\ &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;Revert&lt;span class=&quot;se&quot;&gt;\ &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;0 &lt;span class=&quot;p&quot;&gt;;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;esac&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[[&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$first_line&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;~ &lt;span class=&quot;nv&quot;&gt;$pattern&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
  &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Commit message does not follow Conventional Commits:&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&amp;amp;2
  &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;  &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$first_line&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&amp;amp;2
  &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Expected: &amp;lt;type&amp;gt;(&amp;lt;scope&amp;gt;)!: &amp;lt;description&amp;gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&amp;amp;2
  &lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;1
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;An agent that hits this hook sees the error, fixes the message and tries again. That feedback loop is exactly what makes the format stick.&lt;/p&gt;

&lt;h3 id=&quot;3-a-pull-request-title-check&quot;&gt;3. A pull request title check&lt;/h3&gt;

&lt;p&gt;If you squash-merge, the PR title &lt;em&gt;becomes&lt;/em&gt; the commit message on the main branch. Check it in CI with the same pattern:&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pr-title&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;pull_request&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;types&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;opened&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;edited&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;synchronize&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;check&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Validate PR title&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;TITLE&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;$&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;|&lt;/span&gt;
          &lt;span class=&quot;s&quot;&gt;pattern=&apos;^(feat|fix|docs|refactor|perf|test|build|ci|chore|revert)(\([a-z0-9._-]+\))?!?: .{1,72}$&apos;&lt;/span&gt;
          &lt;span class=&quot;s&quot;&gt;[[ &quot;$TITLE&quot; =~ $pattern ]] || { echo &quot;Bad PR title: $TITLE&quot;; exit 1; }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Note that the title goes through an environment variable instead of being pasted into the script. A PR title is untrusted input.&lt;/p&gt;

&lt;h3 id=&quot;4-release-tags-and-a-changelog&quot;&gt;4. Release tags and a changelog&lt;/h3&gt;

&lt;p&gt;Tag releases as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vX.Y.Z&lt;/code&gt;. Then a release tool (there are several; pick one that fits your stack) can compute the next version from the commits since the last tag and generate the changelog. Even without a tool, the history is now filterable:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# everything user-visible since the last release&lt;/span&gt;
git log &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;git describe &lt;span class=&quot;nt&quot;&gt;--tags&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--abbrev&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;0&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;..HEAD &lt;span class=&quot;nt&quot;&gt;--oneline&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;--grep&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;^feat&apos;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--grep&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;^fix&apos;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--grep&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;!:&apos;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;5-show-the-version&quot;&gt;5. Show the version&lt;/h3&gt;

&lt;p&gt;Make the running version visible: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--version&lt;/code&gt; for a CLI, a footer or an about page for a web app, a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/health&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/version&lt;/code&gt; endpoint for a service. When something breaks, the first question is “which version is this?”, and an agent debugging a deployment needs the same answer.&lt;/p&gt;

&lt;h3 id=&quot;6-keep-the-guardrails-short&quot;&gt;6. Keep the guardrails short&lt;/h3&gt;

&lt;p&gt;Next to the commit rules, my agent instructions have a few lines on behavior: no force-pushes, no history rewrites, commit under the configured identity, no extra attribution or marketing lines in messages. Short and factual beats long and clever.&lt;/p&gt;

&lt;h2 id=&quot;typical-pitfalls&quot;&gt;Typical pitfalls&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Commits that are too big.&lt;/strong&gt; The most common failure: an agent finishes a whole task and then makes one giant commit. Fix: tell it to commit after each logical step, and keep the “one commit = one change” rule in the instructions.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Mixed topics.&lt;/strong&gt; A &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feat&lt;/code&gt; that also renames files and bumps a dependency cannot be classified. If the agent struggles to name the type, the commit should be split.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feat&lt;/code&gt; versus &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fix&lt;/code&gt;.&lt;/strong&gt; Agents tend to label everything &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feat&lt;/code&gt;. A simple test: did it behave wrongly before (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fix&lt;/code&gt;), or does it do something new (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feat&lt;/code&gt;)? Wrong labels produce wrong version bumps.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Squash-merge titles.&lt;/strong&gt; The individual commits may be perfect and still disappear, because the squash commit takes the PR title. That is why the PR title check matters.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Pre-1.0 versions.&lt;/strong&gt; SemVer says anything may change at any time while the major version is 0. Decide up front what that means for you, and do not let tooling or agents treat &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0.x&lt;/code&gt; minor bumps as safe by default.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Monorepos and multiple services.&lt;/strong&gt; One version number for everything rarely works. Use scopes to name the package or service, version them separately, and make sure your release tool understands the layout.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Hiding breaking changes.&lt;/strong&gt; Agents rarely mark a change as breaking on their own. If your project has a public interface, add a checklist item to the review: “does this change anything a consumer can observe?”&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;wrap-up-and-checklist&quot;&gt;Wrap-up and checklist&lt;/h2&gt;

&lt;p&gt;Conventional Commits and SemVer are not new and not exciting. That is exactly why they work: they are shared conventions that humans, agents and tools already understand. With agents in the loop they stop being nice-to-have hygiene and become the interface that keeps a fast-moving history reviewable, releasable and reversible.&lt;/p&gt;

&lt;p&gt;Checklist to take away:&lt;/p&gt;

&lt;ul class=&quot;task-list&quot;&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Conventional Commits rule in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AGENTS.md&lt;/code&gt;, including “one commit = one change”&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;commit-msg&lt;/code&gt; hook that rejects non-conforming messages&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;PR title check if you squash-merge&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Release tags &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vX.Y.Z&lt;/code&gt;, changelog generated from commits&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Written rule: minor/patch updates may be automatic, major only via PR&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Breaking changes marked with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;!&lt;/code&gt; and a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BREAKING CHANGE:&lt;/code&gt; footer&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Version visible in the running software&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Guardrails: no force-push, correct identity, no extra attribution lines&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;A decision for pre-1.0 versions and for monorepos&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">When are multi-agent systems worth their tokens?</title>
    <link href="https://blog.weisser.dev/blog/2026/06/11/when-multi-agent-is-worth-it/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-06-11T00:00:00+00:00</published>
    <updated>2026-06-11T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/06/11/when-multi-agent-is-worth-it/</id>
    <category term="ai" />
    <category term="agents" />
    <summary type="html">Multi-agent systems are worth their tokens when the task is broad, parallelisable and valuable enough to
pay for several agents’ worth of context, and when you can verify the result. For most other tasks, a
single agent with good tools is cheaper, easier to debug and easier to govern. This post c...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/06/11/when-multi-agent-is-worth-it/">&lt;p&gt;Multi-agent systems are worth their tokens when the task is broad, parallelisable and valuable enough to
pay for several agents’ worth of context, and when you can verify the result. For most other tasks, a
single agent with good tools is cheaper, easier to debug and easier to govern. This post compares three
designs, the single agent, the orchestrator-worker pattern and the pipeline, on cost, reliability and
governance, so the choice is made on purpose rather than by fashion.&lt;/p&gt;

&lt;h2 id=&quot;what-the-evidence-says-about-cost&quot;&gt;What the evidence says about cost&lt;/h2&gt;

&lt;p&gt;Anthropic published a candid account of its multi-agent research system, including what it costs. Two
statements are worth keeping side by side. The first explains why the approach can work at all:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Multi-agent systems work mainly because they help spend enough tokens to solve the problem.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The second gives the price:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;In our data, agents typically use about 4× more tokens than chat interactions, and multi-agent systems use about 15× more tokens than chats.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://www.anthropic.com/engineering/multi-agent-research-system&quot;&gt;Anthropic, How we built our multi-agent research system&lt;/a&gt;.
These figures come from one system doing open-ended research, and your ratios will differ. The structural
point survives: a multi-agent design buys capacity by spending tokens, so it only pays when the task’s
value exceeds that spend. That is why cost belongs in the design
and is not something to discover on the invoice.&lt;/p&gt;

&lt;p&gt;The research side is just as sober. A study of failures in multi-agent LLM systems opens its abstract with
a caution:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Despite enthusiasm for Multi-Agent LLM Systems (MAS), their performance gains on popular benchmarks are often minimal.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://arxiv.org/abs/2503.13657&quot;&gt;Why Do Multi-Agent LLM Systems Fail?&lt;/a&gt; (arXiv). Read together,
the two sources say the same thing: more agents are not automatically better, and where they help, they
help because of parallel context and breadth, not because of magic.&lt;/p&gt;

&lt;h2 id=&quot;three-designs&quot;&gt;Three designs&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/agents/when-multi-agent-is-worth-it-1.svg&quot; alt=&quot;Single agent, orchestrator-worker and pipeline topologies compared&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;single-agent&quot;&gt;Single agent&lt;/h3&gt;

&lt;p&gt;One agent, one context, a set of tools. It reads, decides and acts in a loop.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Cost:&lt;/strong&gt; lowest. You pay for one context that grows as the run proceeds.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Reliability:&lt;/strong&gt; failures stay inside one trace, which makes them easy to read and reproduce.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Governance:&lt;/strong&gt; one identity, one tool list, one audit trail.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Limits:&lt;/strong&gt; the context window is the ceiling. Broad tasks (survey twenty sources, review a hundred
files) get shallow or run out of room.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;orchestrator-worker&quot;&gt;Orchestrator-worker&lt;/h3&gt;

&lt;p&gt;A lead agent plans, spawns workers for sub-tasks in parallel, and merges their results.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Cost:&lt;/strong&gt; highest. Every worker carries its own context, and the lead pays again to read and merge.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Reliability:&lt;/strong&gt; failures move to the seams. The lead may split the task badly, workers may duplicate
effort or return conflicting claims, and the merge may hide the disagreement.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Governance:&lt;/strong&gt; several identities and tool sets. Each worker needs its own scope; the lead should not
inherit the union of all of them.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Strengths:&lt;/strong&gt; breadth. Independent sub-questions run at the same time, and each worker’s context stays
focused. The Claude Code documentation describes the isolation that makes this useful:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;Each subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://code.claude.com/docs/en/sub-agents&quot;&gt;Claude Code docs, Create custom subagents&lt;/a&gt; (live
documentation, quoted as fetched on 2026-10-04). Independent permissions are the governance hook:
workers can be given less than the lead.&lt;/p&gt;

&lt;h3 id=&quot;pipeline&quot;&gt;Pipeline&lt;/h3&gt;

&lt;p&gt;Fixed stages, each handled by a specialised agent or a plain function: plan, build, check. Control flow is
in your code or workflow, not in a model’s decision.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Cost:&lt;/strong&gt; moderate and predictable, because the number of stages is fixed.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Reliability:&lt;/strong&gt; failures concentrate at the stage boundaries. Define each hand-off as a typed record
and validate it.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Governance:&lt;/strong&gt; easiest of the multi-agent options, because each stage has a known tool list and the
sequence is visible in the definition.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Limits:&lt;/strong&gt; it only fits tasks whose steps you can name in advance. When the path depends on what is
found, a pipeline gets awkward.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;a-decision-guide&quot;&gt;A decision guide&lt;/h2&gt;

&lt;p&gt;Ask these questions in order and stop at the first “no” for a multi-agent design.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Is the task decomposable into independent parts?&lt;/strong&gt; If sub-tasks depend on each other’s output, extra
agents add waiting and coordination, not speed.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Is the breadth beyond one context window?&lt;/strong&gt; If a single agent can hold the material, split only if
you need different permissions for different parts.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Is the value high enough?&lt;/strong&gt; Estimate tokens per run for each design and compare with what a correct
answer is worth. A tenfold multiplier on a cheap task is still cheap; on a high-volume task it is a
budget line.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Can you verify the result?&lt;/strong&gt; Merged output from several agents needs a check: tests, a schema, a
second source. If you cannot check it, you cannot trust the extra complexity.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Can you govern it?&lt;/strong&gt; Per-agent scopes, per-run budgets and a trace across hand-offs must exist
before you add agents.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the answer to the first question is “no” or the task is a straight line, &lt;a href=&quot;/blog/2026/05/28/workflows-vs-agents/&quot;&gt;workflows beat open-ended
agents&lt;/a&gt; for the same reason: a fixed sequence is cheaper and more
predictable than a model choosing steps.&lt;/p&gt;

&lt;h2 id=&quot;practical-rules-if-you-do-go-multi-agent&quot;&gt;Practical rules if you do go multi-agent&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Give the lead a budget, and pass a share to each worker.&lt;/strong&gt; An unbounded fan-out is a denial-of-wallet
vulnerability as well as a cost problem.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Cap depth and fan-out.&lt;/strong&gt; Workers spawning workers needs an explicit limit.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Scope tools per worker.&lt;/strong&gt; A search worker needs search, not write access. Do not let the lead inherit
everything.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Return structured results.&lt;/strong&gt; Ask workers for named fields and sources, not prose, so the merge step can
compare claims.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Trace across agents.&lt;/strong&gt; One run identifier that links lead and workers makes post-hoc debugging
possible.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Test the single-agent baseline first.&lt;/strong&gt; If one agent with better tools solves the task, you have saved
a lot of money.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;key-takeaways&quot;&gt;Key takeaways&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Multi-agent designs buy breadth with tokens; the published ratio of about 15× over chat is one team’s
number, but the direction holds.&lt;/li&gt;
  &lt;li&gt;Benchmark gains from multi-agent setups are often small, so measure against a single-agent baseline.&lt;/li&gt;
  &lt;li&gt;Single agent is cheapest and easiest to govern; orchestrator-worker is broadest and costliest; pipeline
is predictable and fits known steps.&lt;/li&gt;
  &lt;li&gt;Failures live at hand-offs: use typed contracts, budgets, depth limits and per-worker permissions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Anthropic, &lt;a href=&quot;https://www.anthropic.com/engineering/multi-agent-research-system&quot;&gt;How we built our multi-agent research system&lt;/a&gt; (2025).&lt;/li&gt;
  &lt;li&gt;arXiv, &lt;a href=&quot;https://arxiv.org/abs/2503.13657&quot;&gt;Why Do Multi-Agent LLM Systems Fail?&lt;/a&gt; (2025).&lt;/li&gt;
  &lt;li&gt;Anthropic, &lt;a href=&quot;https://code.claude.com/docs/en/sub-agents&quot;&gt;Create custom subagents (Claude Code docs)&lt;/a&gt; (live documentation).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;First published on the open-agentix blog.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">Human in the loop for AI agents that works: fewer approvals, better ones</title>
    <link href="https://blog.weisser.dev/blog/2026/06/09/human-in-the-loop-that-works/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-06-09T00:00:00+00:00</published>
    <updated>2026-06-09T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/06/09/human-in-the-loop-that-works/</id>
    <category term="ai" />
    <category term="agents" />
    <summary type="html">Human in the loop for AI agents works when approvals are rare, specific and informed, and it fails when a
person is asked to approve every tool call. The first design keeps a person in control of the actions that
matter. The second trains people to click “approve” without reading, which is worse ...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/06/09/human-in-the-loop-that-works/">&lt;p&gt;Human in the loop for AI agents works when approvals are rare, specific and informed, and it fails when a
person is asked to approve every tool call. The first design keeps a person in control of the actions that
matter. The second trains people to click “approve” without reading, which is worse than having no prompt
at all, because it looks like a control while delivering none. This post argues for a different split:
deterministic policy for the routine, a human decision for the high-risk, and enough context at the
moment of decision to make that decision real.&lt;/p&gt;

&lt;h2 id=&quot;what-the-standards-actually-ask-for&quot;&gt;What the standards actually ask for&lt;/h2&gt;

&lt;p&gt;The Model Context Protocol specification is often quoted as requiring a person to approve every tool call.
Read it carefully. The sentence is about the &lt;em&gt;ability to deny&lt;/em&gt;:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;there SHOULD always be a human in the loop with the ability to deny tool invocations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://modelcontextprotocol.io/specification/2025-06-18/server/tools&quot;&gt;MCP specification 2025-06-18, Tools&lt;/a&gt;.
That is a recommendation about keeping control available, not a demand that every call be confirmed. The
same page is also candid about where tool metadata comes from:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;clients MUST consider tool annotations to be untrusted unless they come from trusted servers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A tool that claims “read-only” or “harmless” in its own description has not earned that label. Your risk
classification therefore has to be yours, not copied from the tool.&lt;/p&gt;

&lt;p&gt;OWASP’s guidance for prompt injection points the same way, with two sentences that belong together:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Restrict the model’s access privileges to the minimum necessary for its intended operations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;Implement human-in-the-loop controls for privileged operations to prevent unauthorized actions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://genai.owasp.org/llmrisk/llm01-prompt-injection/&quot;&gt;OWASP LLM01:2025 Prompt Injection&lt;/a&gt;. Note
the structure: first shrink what the model can do, then put a human on the &lt;em&gt;privileged&lt;/em&gt; operations. Not
on everything.&lt;/p&gt;

&lt;h2 id=&quot;why-approving-everything-backfires&quot;&gt;Why approving everything backfires&lt;/h2&gt;

&lt;p&gt;Approval fatigue is not a character flaw; it is predictable.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Frequency erodes attention.&lt;/strong&gt; When 95 of 100 prompts are harmless, the hundredth gets the same
reflex as the first 99.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Prompts are low-information.&lt;/strong&gt; “Run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;curl https://...&lt;/code&gt;? [y/n]” gives a person almost nothing to judge
with, so they judge by habit.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The cost of “no” is visible, the cost of “yes” is not.&lt;/strong&gt; Declining stalls the task and an annoyed
colleague; approving costs nothing today.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;It scales badly.&lt;/strong&gt; A team with ten agents and three approvers cannot read every request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A control that people systematically defeat is a liability. It also moves blame to the person who clicked,
which is the opposite of the blameless approach you want in incident response.&lt;/p&gt;

&lt;h2 id=&quot;route-by-risk-instead&quot;&gt;Route by risk instead&lt;/h2&gt;

&lt;p&gt;Decide in advance which actions need which handling, and make the routing deterministic.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Risk&lt;/th&gt;
      &lt;th&gt;Examples&lt;/th&gt;
      &lt;th&gt;Handling&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Low&lt;/td&gt;
      &lt;td&gt;Read-only queries within scope, formatting, local calculations&lt;/td&gt;
      &lt;td&gt;Allow by policy, no prompt&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Medium&lt;/td&gt;
      &lt;td&gt;Scoped writes that can be undone, creating a draft, adding a comment&lt;/td&gt;
      &lt;td&gt;Allow by policy and write an audit record; review in aggregate&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;High&lt;/td&gt;
      &lt;td&gt;Irreversible or external effects: payments, deleting data, sending messages, changing permissions, production deploys&lt;/td&gt;
      &lt;td&gt;Human approval with context&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/agents/human-in-the-loop-that-works-1.svg&quot; alt=&quot;Risk-based routing of agent actions to policy or human approval&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The routing is a policy question, not a model question. A deterministic gate that evaluates the tool, the
arguments and the acting identity gives the same answer every time and leaves a record, which is the case for
deterministic policy gates. The model should
never be the one deciding whether its own action needs approval.&lt;/p&gt;

&lt;h2 id=&quot;make-the-approvals-that-remain-good&quot;&gt;Make the approvals that remain good&lt;/h2&gt;

&lt;p&gt;When a high-risk action does reach a person, the approval screen should answer five questions without
requiring a trip to the logs:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;What exactly will happen?&lt;/strong&gt; The concrete change as a diff, a rendered message or the exact record,
not a function name.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Why now?&lt;/strong&gt; The task and the step that led to this call, in a sentence.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;What is the blast radius?&lt;/strong&gt; How many records, which environment, whether it can be undone.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Where did the inputs come from?&lt;/strong&gt; Whether untrusted text (a web page, an inbound email) influenced
the arguments.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;What are the options?&lt;/strong&gt; Approve, deny with a reason that goes back to the agent, or approve with a
narrower scope.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two more practices help. Give approvers a &lt;strong&gt;time limit and a safe default&lt;/strong&gt;: if nobody decides within the
window, the action does not run. And &lt;strong&gt;separate the approver from the requester&lt;/strong&gt; for sensitive actions,
so that the person who started the run is not the only check on it.&lt;/p&gt;

&lt;p&gt;A related trap is using the approval channel to collect secrets. The MCP specification is explicit that
this is not what such interactions are for:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Servers MUST NOT use elicitation to request sensitive information.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://modelcontextprotocol.io/specification/2025-06-18/client/elicitation&quot;&gt;MCP specification 2025-06-18, Elicitation&lt;/a&gt;.
Passwords and tokens belong in a credential mechanism, not in a prompt that the model or a server controls.&lt;/p&gt;

&lt;h2 id=&quot;shrink-the-prompt-volume-with-boundaries&quot;&gt;Shrink the prompt volume with boundaries&lt;/h2&gt;

&lt;p&gt;Most approval prompts exist because the system cannot tell safe from unsafe. A sandbox gives it a way to
tell. In &lt;a href=&quot;/blog/2026/06/04/sandboxing-agents/&quot;&gt;sandboxing agents&lt;/a&gt; we covered filesystem and network isolation; the
approval angle is that actions inside the boundary need no prompt. Anthropic’s measurement from its own use:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;In our internal usage, we’ve found that sandboxing safely reduces permission prompts by 84%.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://www.anthropic.com/engineering/claude-code-sandboxing&quot;&gt;Anthropic, Making Claude Code more secure and autonomous with sandboxing&lt;/a&gt;.
That figure is one team’s experience, and your numbers will differ, but the direction is the point. The
same article notes that effective sandboxing requires both filesystem and network isolation. Together
with narrow tool grants, it makes “ask a human” the exception, which is the only way it keeps its meaning.&lt;/p&gt;

&lt;h2 id=&quot;how-to-measure-whether-your-approvals-work&quot;&gt;How to measure whether your approvals work&lt;/h2&gt;

&lt;p&gt;Treat the approval flow like any other control and measure it.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Approval rate.&lt;/strong&gt; If 99 percent of requests are approved, the prompt is probably not carrying risk;
convert it to a policy rule or an audited allow.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Time to decision.&lt;/strong&gt; Approvals decided in a second or two are reflexes.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Denials and edits.&lt;/strong&gt; A healthy flow has some. Zero denials in months means either perfect agents or
nobody reading.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Post-approval incidents.&lt;/strong&gt; Which approved actions later caused trouble, and did the approval screen
show the relevant fact?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run a periodic review: take twenty recent approvals and ask the approver whether they could say, without
looking, what they had approved.&lt;/p&gt;

&lt;h2 id=&quot;when-not-to-remove-the-human&quot;&gt;When not to remove the human&lt;/h2&gt;

&lt;p&gt;Some actions should always have a person: irreversible deletions, money movement, changes to permissions
and policy itself, and anything touching regulated data where a person must be accountable. For these,
invest in the approval experience rather than trying to automate it away. The goal is not to remove
people but to spend their attention where it changes the outcome.&lt;/p&gt;

&lt;h2 id=&quot;key-takeaways&quot;&gt;Key takeaways&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;The MCP specification asks for the ability to deny, not for confirmation of every call.&lt;/li&gt;
  &lt;li&gt;Approving everything trains people to approve without reading; that is worse than no prompt.&lt;/li&gt;
  &lt;li&gt;Route actions by risk: allow low risk by policy, allow medium risk with audit, send high risk to a person.&lt;/li&gt;
  &lt;li&gt;Show approvers the concrete change, the reason, the blast radius, the input origin and the options.&lt;/li&gt;
  &lt;li&gt;Use sandboxing and narrow grants to cut the prompt volume, and measure approval rate and time to decision.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Model Context Protocol, &lt;a href=&quot;https://modelcontextprotocol.io/specification/2025-06-18/server/tools&quot;&gt;Tools, specification 2025-06-18&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Model Context Protocol, &lt;a href=&quot;https://modelcontextprotocol.io/specification/2025-06-18/client/elicitation&quot;&gt;Elicitation, specification 2025-06-18&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;OWASP Gen AI Security Project, &lt;a href=&quot;https://genai.owasp.org/llmrisk/llm01-prompt-injection/&quot;&gt;LLM01:2025 Prompt Injection&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Anthropic, &lt;a href=&quot;https://www.anthropic.com/engineering/claude-code-sandboxing&quot;&gt;Making Claude Code more secure and autonomous with sandboxing&lt;/a&gt; (2025).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;First published on the open-agentix blog.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">AI agent sandboxing: filesystem and network isolation together</title>
    <link href="https://blog.weisser.dev/blog/2026/06/04/sandboxing-agents/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-06-04T00:00:00+00:00</published>
    <updated>2026-06-04T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/06/04/sandboxing-agents/</id>
    <category term="ai" />
    <category term="agents" />
    <summary type="html">AI agent sandboxing needs two boundaries, not one: a filesystem boundary that limits what the agent can
read and write, and a network boundary that limits where it can send data. With only the first, a
compromised agent can read what it is allowed to read and post it to any server. With only the ...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/06/04/sandboxing-agents/">&lt;p&gt;AI agent sandboxing needs two boundaries, not one: a filesystem boundary that limits what the agent can
read and write, and a network boundary that limits where it can send data. With only the first, a
compromised agent can read what it is allowed to read and post it to any server. With only the second,
it can reach nothing outside, but it can still overwrite your SSH config or read another project’s
secrets. This post explains why both belong together, how to build an egress allow-list, and why a good
sandbox is also the best answer to approval fatigue.&lt;/p&gt;

&lt;h2 id=&quot;why-one-boundary-is-not-enough&quot;&gt;Why one boundary is not enough&lt;/h2&gt;

&lt;p&gt;Think about what a prompt injection needs to do real damage. It needs to get some data (read access) and
move it somewhere (a channel out), or it needs to change something that matters (write access). Each
boundary removes one half.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Setup&lt;/th&gt;
      &lt;th&gt;What a hijacked agent can still do&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;No sandbox&lt;/td&gt;
      &lt;td&gt;Read any file the user can read, send it anywhere, modify anything&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Filesystem only&lt;/td&gt;
      &lt;td&gt;Read the files in scope and send them to any host&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Network only&lt;/td&gt;
      &lt;td&gt;Modify or read files outside the project, but not exfiltrate directly&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Both&lt;/td&gt;
      &lt;td&gt;Touch only the project directory and talk only to listed hosts&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;This is the same shape as the &lt;a href=&quot;/blog/2026/03/12/the-lethal-trifecta/&quot;&gt;lethal trifecta&lt;/a&gt;: untrusted input, access to
private data and a way to communicate externally. A sandbox is one of the few controls that removes the
third leg regardless of what the model decides to do. Anthropic’s engineering team states the
requirement directly:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;It is worth noting that effective sandboxing requires both filesystem and network isolation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://www.anthropic.com/engineering/claude-code-sandboxing&quot;&gt;Anthropic, Making Claude Code more secure and autonomous with sandboxing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/agents/sandboxing-agents-1.svg&quot; alt=&quot;Filesystem and network isolation around an agent process&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-filesystem-boundary&quot;&gt;The filesystem boundary&lt;/h2&gt;

&lt;p&gt;Keep the rule simple: the agent can write inside its working directory and read what its task needs,
nothing else.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Scope writes to the project or a scratch directory.&lt;/strong&gt; Everything else is read-only or invisible.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Hide credential locations.&lt;/strong&gt; Home-directory dotfiles, cloud credential files, SSH keys and browser
profiles should not be readable at all. Hiding is stronger than denying, because the agent cannot even
learn the path exists. See &lt;a href=&quot;/blog/2026/04/02/secrets-for-agents/&quot;&gt;secrets for agents&lt;/a&gt; for how to hand over
credentials without putting them on disk.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Protect your own configuration.&lt;/strong&gt; If the agent can edit its own settings, hooks or startup files, it
can widen its own permissions on the next run. Make those paths read-only.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Use disposable workspaces.&lt;/strong&gt; A fresh checkout or container per run limits what an unnoticed change
can persist.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On Linux this is usually done with namespaces, bind mounts and seccomp or with a container; on macOS
with the system sandbox. You rarely need to build it yourself, but you should know which one your tool
uses and what it does not cover.&lt;/p&gt;

&lt;h2 id=&quot;the-network-boundary-and-egress-allow-lists&quot;&gt;The network boundary and egress allow-lists&lt;/h2&gt;

&lt;p&gt;The network boundary turns “any host” into “these hosts”. The most practical form is a proxy that is the
only route out, with a deny-by-default list.&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# Illustrative egress policy, not tied to a specific product&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;egress&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;deny&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;allow&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;api.example.org&lt;/span&gt;          &lt;span class=&quot;c1&quot;&gt;# the model provider or gateway&lt;/span&gt;
    &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;registry.example.org&lt;/span&gt;     &lt;span class=&quot;c1&quot;&gt;# package mirror, read-only&lt;/span&gt;
    &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;git.example.org&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;methods&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;GET&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;]&lt;/span&gt;                 &lt;span class=&quot;c1&quot;&gt;# fetch, but no pushes from inside the sandbox&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;denied&lt;/span&gt;                        &lt;span class=&quot;c1&quot;&gt;# every blocked attempt becomes an event&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Some practical points:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Start from deny and add hosts as the task needs them.&lt;/strong&gt; Starting open and trying to close later
never converges.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Prefer package mirrors you control&lt;/strong&gt; to the public registries, so the list stays short and
reviewable.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Watch for allowed-host abuse.&lt;/strong&gt; A broad host such as a code-hosting site or a paste service can
still serve as a drop box. Allow the narrowest hostname and path you can, and treat broad hosts as
open channels.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Resolve names at the proxy.&lt;/strong&gt; Raw IP connections and DNS tunnelling are bypasses; block direct
connections and let only the proxy resolve names.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Make denials visible.&lt;/strong&gt; A blocked connection is a signal, both for the user and for monitoring. The
Claude Code documentation describes exactly this behaviour:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;When the sandbox blocks a network connection, Claude Code names the denied host in the command’s result, so Claude sees what was blocked.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://code.claude.com/docs/en/sandboxing&quot;&gt;Claude Code docs, sandboxed Bash tool&lt;/a&gt; (live documentation, quoted as fetched on 2026-10-04). It matters because the agent
can then ask for the host explicitly, and a person can decide once, instead of the agent trying
workarounds.&lt;/p&gt;

&lt;h2 id=&quot;sandboxing-is-an-approval-fatigue-control&quot;&gt;Sandboxing is an approval-fatigue control&lt;/h2&gt;

&lt;p&gt;Permission prompts are a security mechanism with a known failure mode: people stop reading them. If the
agent asks “run this command?” thirty times an hour, the thirty-first answer is a reflex. A sandbox
changes the economics. Inside the boundary, actions are low risk and can run without asking; outside
it, the request is rare enough to deserve attention. Anthropic reports the effect from its own use:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;In our internal usage, we’ve found that sandboxing safely reduces permission prompts by 84%.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: same article as above. That number comes from one team’s usage and is not a promise for your
workload, but the mechanism is general: fewer, better prompts. The follow-up question, how to design
those remaining approvals, is the subject of &lt;a href=&quot;/blog/2026/06/09/human-in-the-loop-that-works/&quot;&gt;human in the loop that works&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;where-sandboxing-fits-in-least-privilege&quot;&gt;Where sandboxing fits in least privilege&lt;/h2&gt;

&lt;p&gt;OWASP names the root cause of excessive agency in three parts:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The root cause of Excessive Agency is typically one or more of: excessive functionality; excessive permissions; excessive autonomy.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://genai.owasp.org/llmrisk/llm062025-excessive-agency/&quot;&gt;OWASP LLM06:2025 Excessive Agency&lt;/a&gt;.
A sandbox addresses the “permissions” part at the process level. It does not replace the other two:
remove tools the agent does not need (functionality) and gate risky actions (autonomy). The same principle applies per agent in a
pipeline: each holds only the tools its step requires. Sandbox plus per-agent tool grants gives you two
independent layers.&lt;/p&gt;

&lt;h2 id=&quot;what-a-sandbox-does-not-do&quot;&gt;What a sandbox does not do&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;It does not stop misuse of allowed access.&lt;/strong&gt; An agent permitted to write the project can still write
bad code there. Review and tests remain necessary.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;It does not protect data inside the scope.&lt;/strong&gt; If the secret is in the project directory, the agent can
read it. Keep secrets out of the workspace.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;It is not a perimeter against everything.&lt;/strong&gt; Kernel bugs and misconfiguration exist. Treat the sandbox
as one layer, not the layer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;a-short-checklist&quot;&gt;A short checklist&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Writes limited to the working directory; sensitive paths hidden, not just denied.&lt;/li&gt;
  &lt;li&gt;The agent’s own configuration is read-only to the agent.&lt;/li&gt;
  &lt;li&gt;A single proxy route out, deny by default, narrow allow-list, denials logged.&lt;/li&gt;
  &lt;li&gt;No long-lived secrets in the workspace or the environment.&lt;/li&gt;
  &lt;li&gt;Disposable workspace per run where practical.&lt;/li&gt;
  &lt;li&gt;A tested way to widen the sandbox for one task, with a person deciding.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;key-takeaways&quot;&gt;Key takeaways&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Filesystem isolation without network isolation lets data leave; network isolation without filesystem
isolation lets the agent reach files it should not touch.&lt;/li&gt;
  &lt;li&gt;Use a deny-by-default egress proxy with a short, reviewable allow-list and visible denials.&lt;/li&gt;
  &lt;li&gt;Sandboxing reduces approval fatigue, which makes the remaining approvals more meaningful.&lt;/li&gt;
  &lt;li&gt;It is one layer next to least privilege, secret handling and review.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Anthropic, &lt;a href=&quot;https://www.anthropic.com/engineering/claude-code-sandboxing&quot;&gt;Making Claude Code more secure and autonomous with sandboxing&lt;/a&gt; (2025).&lt;/li&gt;
  &lt;li&gt;Anthropic, &lt;a href=&quot;https://code.claude.com/docs/en/sandboxing&quot;&gt;Configure the sandboxed Bash tool (Claude Code docs)&lt;/a&gt; (live documentation).&lt;/li&gt;
  &lt;li&gt;OWASP Gen AI Security Project, &lt;a href=&quot;https://genai.owasp.org/llmrisk/llm062025-excessive-agency/&quot;&gt;LLM06:2025 Excessive Agency&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;First published on the open-agentix blog.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">Workflows or agents? Choosing how much autonomy a step needs</title>
    <link href="https://blog.weisser.dev/blog/2026/05/28/workflows-vs-agents/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-05-28T00:00:00+00:00</published>
    <updated>2026-05-28T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/05/28/workflows-vs-agents/</id>
    <category term="ai" />
    <category term="agents" />
    <summary type="html">Workflows vs agents is not a choice you make once for a whole system. It is a decision you make for each step: how much freedom does this step need? The answer that holds up best in practice is to use the least autonomy that solves the task. Fixed code paths are cheaper, easier to test and easier...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/05/28/workflows-vs-agents/">&lt;p&gt;Workflows vs agents is not a choice you make once for a whole system. It is a decision you make for each step: how much freedom does this step need? The answer that holds up best in practice is to use the least autonomy that solves the task. Fixed code paths are cheaper, easier to test and easier to govern. Model-directed loops are flexible but cost more and are harder to predict. Reach for the loop only where the path cannot be known in advance.&lt;/p&gt;

&lt;h2 id=&quot;the-two-ends-of-the-scale&quot;&gt;The two ends of the scale&lt;/h2&gt;

&lt;p&gt;Anthropic’s engineering guide on building agents draws the line between the two:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Workflows are systems where LLMs and tools are orchestrated through predefined code paths.&lt;/p&gt;

  &lt;p&gt;— Anthropic, &lt;a href=&quot;https://www.anthropic.com/engineering/building-effective-agents&quot;&gt;Building Effective AI Agents&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In an agent, by contrast, the model decides the next step and which tool to use, and keeps going until it judges the task done. The guide’s advice on how to build either is modest:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Consistently, the most successful implementations use simple, composable patterns rather than complex frameworks.&lt;/p&gt;

  &lt;p&gt;— Anthropic, &lt;a href=&quot;https://www.anthropic.com/engineering/building-effective-agents&quot;&gt;Building Effective AI Agents&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The term “agent” covers a wide range, so think of a scale rather than two boxes.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/agents/workflows-vs-agents-1.svg&quot; alt=&quot;Scale of autonomy from workflow to agent&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;A single model call&lt;/strong&gt; with a good prompt and perhaps retrieval. Many tasks end here.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A fixed chain of calls.&lt;/strong&gt; The code decides the order; each model call does one job.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Routing.&lt;/strong&gt; One model call chooses which fixed path to take; the paths themselves are code.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Parallel or looped workflows.&lt;/strong&gt; The code fans out or retries according to fixed rules.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;An open agent loop.&lt;/strong&gt; The model chooses the next action from the observations so far.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Moving right gains flexibility and loses predictability. The reasoning-and-acting loop that underlies the right end was described in the ReAct paper, which lets a model&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;generate both reasoning traces and task-specific actions in an interleaved manner&lt;/p&gt;

  &lt;p&gt;— &lt;a href=&quot;https://arxiv.org/abs/2210.03629&quot;&gt;ReAct: Synergizing Reasoning and Acting in Language Models&lt;/a&gt;, arXiv&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That interleaving is exactly what makes an agent adaptive, and exactly what makes its path unknowable before it runs.&lt;/p&gt;

&lt;h2 id=&quot;what-autonomy-costs&quot;&gt;What autonomy costs&lt;/h2&gt;

&lt;p&gt;Every step you hand to the model’s judgement has a price.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Money.&lt;/strong&gt; Loops make many calls, and each call carries a growing context. Anthropic’s write-up of its multi-agent research system measured this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;In our data, agents typically use about 4× more tokens than chat interactions, and multi-agent systems use about 15× more tokens than chats.&lt;/p&gt;

  &lt;p&gt;— Anthropic, &lt;a href=&quot;https://www.anthropic.com/engineering/multi-agent-research-system&quot;&gt;How we built our multi-agent research system&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The same article explains why spending can be worth it for some tasks:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Multi-agent systems work mainly because they help spend enough tokens to solve the problem.&lt;/p&gt;

  &lt;p&gt;— Anthropic, &lt;a href=&quot;https://www.anthropic.com/engineering/multi-agent-research-system&quot;&gt;How we built our multi-agent research system&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For a high-value research question, 15 times the tokens may be cheap. For a routine classification that runs 10,000 times a day, it is not. Read the figures as measurements from one system, not as constants.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Predictability.&lt;/strong&gt; A fixed path produces the same sequence of steps each time; you can write a test for each step. A loop can take 3 steps or 30, and the same input can produce different paths. Latency and cost become distributions, not numbers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Governance.&lt;/strong&gt; With a fixed path, you know before running which tools can be called and in what order, so permissions can be narrow. With a loop, the agent needs every tool it might choose, which widens the blast radius.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Debuggability.&lt;/strong&gt; A failing workflow points to a step. A failing agent loop points to a long transcript and a judgement call.&lt;/p&gt;

&lt;h2 id=&quot;criteria-for-each-step&quot;&gt;Criteria for each step&lt;/h2&gt;

&lt;p&gt;Ask these questions step by step, not for the system as a whole.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Is the sequence known in advance?&lt;/strong&gt; If you can write the steps down, write them as code. Use a model inside a step if the step needs language understanding.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Does the next action depend on what was just found?&lt;/strong&gt; If the decision is a small branch with few outcomes, use routing. If it is open-ended, a loop may be justified.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;How bad is a wrong action?&lt;/strong&gt; Irreversible or high-impact actions favour fixed paths with approvals. Reversible, read-only steps tolerate more freedom.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;What is the cost and latency budget?&lt;/strong&gt; A step that must finish in a second at a fraction of a cent cannot be a loop.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Can you verify the result?&lt;/strong&gt; Autonomy is easier to accept where a check exists, such as tests for generated code. Where you cannot verify, constrain.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;How often does the task run?&lt;/strong&gt; Rare, high-value tasks can afford exploration. Frequent, low-value tasks need cheap, predictable paths.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A worked example: a support process that extracts fields from a ticket, routes it, drafts a reply and creates an issue.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Step&lt;/th&gt;
      &lt;th&gt;Pattern&lt;/th&gt;
      &lt;th&gt;Why&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Extract fields&lt;/td&gt;
      &lt;td&gt;Single model call with a schema&lt;/td&gt;
      &lt;td&gt;Known input, known output&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Route by category&lt;/td&gt;
      &lt;td&gt;Routing&lt;/td&gt;
      &lt;td&gt;A few fixed outcomes&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Look up customer data&lt;/td&gt;
      &lt;td&gt;Code&lt;/td&gt;
      &lt;td&gt;A deterministic API call&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Draft a reply&lt;/td&gt;
      &lt;td&gt;Single model call, human review&lt;/td&gt;
      &lt;td&gt;Language task, checked by a person&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Investigate an odd failure&lt;/td&gt;
      &lt;td&gt;Agent loop, read-only tools&lt;/td&gt;
      &lt;td&gt;Path unknown, nothing irreversible&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Create the issue&lt;/td&gt;
      &lt;td&gt;Code with approval&lt;/td&gt;
      &lt;td&gt;One write, high impact&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Only one of six steps is an agent, and it has read-only tools. Most of the “agentic” behaviour of the process comes from well-placed model calls inside a fixed frame.&lt;/p&gt;

&lt;h2 id=&quot;start-low-move-right-with-evidence&quot;&gt;Start low, move right with evidence&lt;/h2&gt;

&lt;p&gt;A practical order of work:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Build the single call or fixed chain first.&lt;/strong&gt; Measure it with a small eval set.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Find the failures.&lt;/strong&gt; Are they caused by missing information, wrong ordering or tasks that really need exploration?&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Add autonomy only where failures need it&lt;/strong&gt;, in the narrowest form: a router before a loop, a loop with a small tool set before a general one.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Re-measure.&lt;/strong&gt; Compare success, cost and latency to the simpler version. If the loop does not clearly win, keep the simple one.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Constrain the loop&lt;/strong&gt; with step limits, a token budget and a stop condition, and keep logs to see what it did.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same discipline applies throughout: decide the structure on purpose and let prompts fill the gaps. Where steps pass work to each other, define the interface explicitly.&lt;/p&gt;

&lt;h2 id=&quot;limits&quot;&gt;Limits&lt;/h2&gt;

&lt;p&gt;The scale is a mental model, not a taxonomy; real systems mix patterns. Model capabilities also change, and a step that needed a loop last year may be solvable by a single call now. Revisit the choice when you change models. And a simple design is not automatically safe: a fixed chain that passes untrusted text to a model with write access is still exposed.&lt;/p&gt;

&lt;h2 id=&quot;key-takeaways&quot;&gt;Key takeaways&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Choose autonomy per step, not per system.&lt;/li&gt;
  &lt;li&gt;Fixed code paths are cheaper, testable and easier to govern; loops are flexible but costlier and less predictable.&lt;/li&gt;
  &lt;li&gt;Agents can use several times more tokens than chat, and multi-agent systems far more, so use them where the value justifies it.&lt;/li&gt;
  &lt;li&gt;Use criteria: known sequence, impact of errors, verifiability, budget and frequency.&lt;/li&gt;
  &lt;li&gt;Start with the simplest design, measure, and add autonomy only where evidence demands it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Anthropic: &lt;a href=&quot;https://www.anthropic.com/engineering/building-effective-agents&quot;&gt;Building Effective AI Agents&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;arXiv: &lt;a href=&quot;https://arxiv.org/abs/2210.03629&quot;&gt;ReAct: Synergizing Reasoning and Acting in Language Models&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Anthropic: &lt;a href=&quot;https://www.anthropic.com/engineering/multi-agent-research-system&quot;&gt;How we built our multi-agent research system&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;First published on the open-agentix blog.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">Agent evals 101: tasks, graders and transcripts</title>
    <link href="https://blog.weisser.dev/blog/2026/04/09/agent-evals-101/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-04-09T00:00:00+00:00</published>
    <updated>2026-04-09T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/04/09/agent-evals-101/</id>
    <category term="ai" />
    <category term="agents" />
    <summary type="html">AI agent evaluation means running an agent on defined tasks, many times, and scoring what actually
happened in the environment, not just what the agent said at the end. A chatbot eval compares an answer
with a reference. An agent eval has to check side effects: was the file changed, does the row ...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/04/09/agent-evals-101/">&lt;p&gt;&lt;strong&gt;AI agent evaluation&lt;/strong&gt; means running an agent on defined tasks, many times, and scoring what actually
happened in the environment, not just what the agent said at the end. A chatbot eval compares an answer
with a reference. An agent eval has to check side effects: was the file changed, does the row exist,
was the right ticket created, and were forbidden actions avoided? This post defines the vocabulary and
a minimal setup you can build in a day.&lt;/p&gt;

&lt;h2 id=&quot;the-vocabulary&quot;&gt;The vocabulary&lt;/h2&gt;

&lt;p&gt;A small set of terms covers most agent evals.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Task&lt;/strong&gt;: one test case with an input, an environment and a success condition.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Trial&lt;/strong&gt;: one attempt by the agent at a task. Agents are non-deterministic, so one task usually
needs several trials.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Transcript&lt;/strong&gt;: the full record of a trial: messages, tool calls, tool results and final answer.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Grader&lt;/strong&gt;: the logic that scores a trial.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Environment state&lt;/strong&gt;: what is true in the world after the trial, such as database rows or files.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Score&lt;/strong&gt;: the aggregate over graders and trials.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anthropic’s engineering team defines the grader in one sentence:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;A grader is logic that scores some aspect of the agent’s performance.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents&quot;&gt;Demystifying evals for AI agents&lt;/a&gt; (Anthropic, 2026)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Note “some aspect”. A single trial usually has several graders, each looking at a different property.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/agents/agent-evals-101-1.svg&quot; alt=&quot;Agent evaluation loop with tasks, trials and graders&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;grade-the-outcome-not-the-message&quot;&gt;Grade the outcome, not the message&lt;/h2&gt;

&lt;p&gt;An agent that says “I have booked your flight” has not necessarily booked a flight. The reliable check
looks at the world. The same article illustrates this with a booking scenario:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;the outcome is whether a reservation exists in the environment’s SQL database.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents&quot;&gt;Demystifying evals for AI agents&lt;/a&gt; (Anthropic, 2026)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Apply the idea to your own tasks. If the agent should open a pull request, query the repository. If it
should file a ticket, read the tracker. If it should not touch a system, check that the system is
unchanged. The transcript is still valuable, but as evidence for debugging and for grading &lt;em&gt;how&lt;/em&gt; the
agent worked, such as whether it called a forbidden tool, rather than as the main success signal.&lt;/p&gt;

&lt;h2 id=&quot;three-kinds-of-graders&quot;&gt;Three kinds of graders&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Grader&lt;/th&gt;
      &lt;th&gt;Good for&lt;/th&gt;
      &lt;th&gt;Watch out for&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Code&lt;/td&gt;
      &lt;td&gt;State checks, schema validation, tests passing, forbidden-call detection&lt;/td&gt;
      &lt;td&gt;Brittle if it checks wording instead of outcome&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Model (LLM)&lt;/td&gt;
      &lt;td&gt;Rubric-based judgement of text quality, tone, completeness&lt;/td&gt;
      &lt;td&gt;Needs calibration against human labels; can be biased or inconsistent&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Human&lt;/td&gt;
      &lt;td&gt;Calibrating the other graders, ambiguous or high-stakes cases&lt;/td&gt;
      &lt;td&gt;Slow and expensive; sample, do not grade everything&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Prefer code graders wherever the outcome can be checked deterministically. Use an LLM grader with an
explicit rubric where judgement is unavoidable, and spot-check it with humans so you know whether its
scores track yours. Never let a model grade its own work without a rubric and some independent check.&lt;/p&gt;

&lt;h2 id=&quot;a-minimal-task-definition&quot;&gt;A minimal task definition&lt;/h2&gt;

&lt;p&gt;Keep tasks in version control, next to the agent definition they test:&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;refund-small-order&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Customer&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;asks&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;order&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;1042&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;(EUR&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;19.90).&quot;&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;environment&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;fixtures/shop-seed.sql&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;graders&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;code&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;check&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refunds&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;has&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;one&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;order&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;1042&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;amount&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;19.90&quot;&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;code&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;check&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;no&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;call&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;tool&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;payments.refund_large&quot;&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;model&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;rubric&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Reply&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;is&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;polite,&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;states&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;the&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;amount,&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;promises&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;no&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;timeline&quot;&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;trials&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Start with 10 to 20 tasks drawn from real failures and real requests. Include negative tasks, where
the right behaviour is to refuse or ask a question. An eval that only contains success cases rewards
agents that never say no.&lt;/p&gt;

&lt;h2 id=&quot;reliability-passk-versus-passk&quot;&gt;Reliability: pass@k versus pass^k&lt;/h2&gt;

&lt;p&gt;Because trials vary, one number is not enough. Two aggregates answer different questions:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;pass@k&lt;/strong&gt;: the probability that at least one of k trials succeeds. It measures capability: can the
agent do this at all, given a few tries?&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;pass^k&lt;/strong&gt;: the probability that all k trials succeed. It measures reliability: can you depend on it
every time?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pass^k metric comes from the τ-bench paper on tool-using agents:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;We also propose a new metric (pass^k) to evaluate the reliability of agent behavior over multiple trials.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/2406.12045&quot;&gt;τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains&lt;/a&gt; (arXiv, 2024)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If a task succeeds 80 % of the time per trial, and the trials are independent, pass@3 is high but
pass^3 is about 51 %, and pass^8 is about 17 %. For a customer-facing process that runs thousands of
times, pass^k is the number that matches how users experience the agent. Use pass@k for exploration
and pass^k for release gates.&lt;/p&gt;

&lt;h2 id=&quot;public-benchmarks-and-your-own-evals&quot;&gt;Public benchmarks and your own evals&lt;/h2&gt;

&lt;p&gt;Public benchmarks are useful for comparing models, and their authors state why a realistic task source
matters. The SWE-bench paper puts it this way:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;We find real-world software engineering to be a rich, sustainable, and challenging testbed for evaluating the next generation of language models.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/2310.06770&quot;&gt;SWE-bench: Can Language Models Resolve Real-World GitHub Issues?&lt;/a&gt; (arXiv, 2023)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The lesson for your own evals is the data source: real issues, not invented puzzles. A public score does
not tell you whether &lt;em&gt;your&lt;/em&gt; agent, with &lt;em&gt;your&lt;/em&gt; tools and &lt;em&gt;your&lt;/em&gt; policies, handles &lt;em&gt;your&lt;/em&gt; tickets. Build
a private suite from your own history and keep it fresh as the process changes.&lt;/p&gt;

&lt;h2 id=&quot;running-evals-as-part-of-the-harness&quot;&gt;Running evals as part of the harness&lt;/h2&gt;

&lt;p&gt;Evals belong in the agent harness, not in a notebook: the harness resets the environment, runs the
trials, stores transcripts and gates releases on the scores. When a prompt or skill changes,
the eval suite should run before the change ships; this is also the cure for prompts that grow with nothing
checking that they help. A sound structure also makes evals easier because each component has a
testable contract.&lt;/p&gt;

&lt;h2 id=&quot;common-mistakes&quot;&gt;Common mistakes&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Grading the final message only, so side effects go unchecked.&lt;/li&gt;
  &lt;li&gt;Running one trial per task and reporting a single pass rate.&lt;/li&gt;
  &lt;li&gt;Fixtures that leak the answer into the environment.&lt;/li&gt;
  &lt;li&gt;Model graders without a rubric or human calibration.&lt;/li&gt;
  &lt;li&gt;Never retiring tasks that every version passes; they no longer tell you anything.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;key-takeaways&quot;&gt;Key takeaways&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Score the state of the environment after the run; the transcript is evidence, not proof.&lt;/li&gt;
  &lt;li&gt;Use code graders first, model graders with a rubric second, humans to calibrate.&lt;/li&gt;
  &lt;li&gt;Run several trials; report pass@k for capability and pass^k for reliability.&lt;/li&gt;
  &lt;li&gt;Build tasks from real requests and real failures, including cases where the agent should refuse.&lt;/li&gt;
  &lt;li&gt;Run the suite in the harness before every prompt, skill or policy change ships.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents&quot;&gt;Demystifying evals for AI agents&lt;/a&gt;, Anthropic, 2026-01-09.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://arxiv.org/abs/2406.12045&quot;&gt;τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains&lt;/a&gt;, arXiv, 2024.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://arxiv.org/abs/2310.06770&quot;&gt;SWE-bench: Can Language Models Resolve Real-World GitHub Issues?&lt;/a&gt;, arXiv, 2023.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;First published on the open-agentix blog.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">Context engineering: the smallest set of tokens that does the job</title>
    <link href="https://blog.weisser.dev/blog/2026/04/07/context-engineering-basics/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-04-07T00:00:00+00:00</published>
    <updated>2026-04-07T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/04/07/context-engineering-basics/</id>
    <category term="ai" />
    <category term="agents" />
    <summary type="html">Context engineering is the practice of deciding what goes into a model’s context window at each
step of an agent run, and what stays out. A prompt is one input; the context is everything the model
sees: system prompt, tool definitions, skill descriptions, conversation history, retrieved documents...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/04/07/context-engineering-basics/">&lt;p&gt;&lt;strong&gt;Context engineering&lt;/strong&gt; is the practice of deciding what goes into a model’s context window at each
step of an agent run, and what stays out. A prompt is one input; the context is everything the model
sees: system prompt, tool definitions, skill descriptions, conversation history, retrieved documents
and the current task. Because the window is finite and quality degrades as it fills with noise, the
goal is a small, high-signal context rather than a big one.&lt;/p&gt;

&lt;h2 id=&quot;context-is-a-budget-not-a-bucket&quot;&gt;Context is a budget, not a bucket&lt;/h2&gt;

&lt;p&gt;Anthropic’s engineering team puts the starting point in one sentence:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Context, therefore, must be treated as a finite resource with diminishing marginal returns.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents&quot;&gt;Effective context engineering for AI agents&lt;/a&gt; (Anthropic, 2025)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And the same article gives the goal:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;good context engineering means finding the smallest possible set of high-signal tokens that maximize the likelihood of some desired outcome.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents&quot;&gt;Effective context engineering for AI agents&lt;/a&gt; (Anthropic, 2025)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Notice what this implies. Adding another paragraph “just in case” is not free: it competes with
everything else for attention, cost and latency. Prompt engineering asks “how do I word this
instruction?”. Context engineering asks “which tokens does the model need right now, and where do
they come from?”.&lt;/p&gt;

&lt;h2 id=&quot;what-actually-fills-the-window&quot;&gt;What actually fills the window&lt;/h2&gt;

&lt;p&gt;Before optimising, measure. In a typical agent, the window is shared by five consumers:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;System prompt&lt;/strong&gt;: role, rules, output format.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Tool definitions&lt;/strong&gt;: names, descriptions and JSON schemas of every tool offered.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Skill metadata&lt;/strong&gt;: the short descriptions that tell the agent which skills exist.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;History&lt;/strong&gt;: earlier turns, tool calls and tool results.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The current task&lt;/strong&gt;: the actual request and its inputs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/agents/context-engineering-basics-1.svg&quot; alt=&quot;Breakdown of what fills an agent&apos;s context window&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Tool definitions and history are usually the surprise. Every tool you connect costs tokens on every
turn, whether or not it is used, and tool results pile up fast. Writing good, compact tools is its own
discipline; see &lt;a href=&quot;/blog/2026/03/19/writing-tools-agents-can-use/&quot;&gt;writing tools agents can use&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;tools-that-explode-the-context&quot;&gt;Tools that explode the context&lt;/h2&gt;

&lt;p&gt;Connecting an agent to many tool servers has a visible price. Anthropic describes it like this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;In cases where agents are connected to thousands of tools, they’ll need to process hundreds of thousands of tokens before reading a request.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/code-execution-with-mcp&quot;&gt;Code execution with MCP: building more efficient AI agents&lt;/a&gt; (Anthropic, 2025)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The same article shows the other side of the trade. If intermediate data is processed by code instead
of being routed through the model, the numbers change dramatically:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;This reduces the token usage from 150,000 tokens to 2,000 tokens—a time and cost saving of 98.7%.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/code-execution-with-mcp&quot;&gt;Code execution with MCP: building more efficient AI agents&lt;/a&gt; (Anthropic, 2025)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is one example from one article, not a universal ratio. The transferable idea is that the model
does not need to read data it only forwards. Filter, aggregate and join in code, and show the model
the result.&lt;/p&gt;

&lt;h2 id=&quot;four-practical-techniques&quot;&gt;Four practical techniques&lt;/h2&gt;

&lt;h3 id=&quot;1-load-on-demand&quot;&gt;1. Load on demand&lt;/h3&gt;

&lt;p&gt;Offer a short list of capabilities and load the details only when needed. Skills do this with a
one-line description that is always present and a body that is read only when the skill applies. The same logic applies to tools:
expose the tools for the current step, not for the whole process.&lt;/p&gt;

&lt;h3 id=&quot;2-compaction&quot;&gt;2. Compaction&lt;/h3&gt;

&lt;p&gt;When a conversation approaches the limit, summarise it and continue with the summary. Keep what the
next step needs: decisions made, open questions, file paths and identifiers. Drop what it does not:
raw tool output that has already been used, dead ends, repeated instructions. Compaction loses
information, so test it with a task that depends on an early detail.&lt;/p&gt;

&lt;h3 id=&quot;3-structured-notes-outside-the-window&quot;&gt;3. Structured notes outside the window&lt;/h3&gt;

&lt;p&gt;Let the agent write progress notes to a file or store and read them back later. A notes file with
“done”, “next” and “decisions” survives a context reset and costs a few hundred tokens. It is also
auditable by a human, which a hidden summary is not.&lt;/p&gt;

&lt;h3 id=&quot;4-sub-tasks-with-their-own-context&quot;&gt;4. Sub-tasks with their own context&lt;/h3&gt;

&lt;p&gt;Hand a self-contained sub-task, such as “search the repository for all callers of this function”, to a
sub-agent with a fresh window. It can read thousands of tokens of noise and return a summary of a few
hundred. The parent context stays clean. The hand-off needs a clear input and a clear output format,
otherwise the summary loses what mattered.&lt;/p&gt;

&lt;p&gt;A related tool is a dedicated place for reasoning. Anthropic describes a “think” tool as&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;a “think” tool that creates dedicated space for structured thinking during complex tasks.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/claude-think-tool&quot;&gt;The “think” tool: Enabling Claude to stop and think&lt;/a&gt; (Anthropic, 2025)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Such a tool adds a step, so use it where a decision benefits from an explicit pause, not everywhere.&lt;/p&gt;

&lt;h2 id=&quot;prompt-versus-context-a-quick-test&quot;&gt;Prompt versus context: a quick test&lt;/h2&gt;

&lt;p&gt;Ask these questions when a run behaves badly:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[ ] Is the instruction unclear?            -&amp;gt; a prompt problem
[ ] Is the needed fact missing?            -&amp;gt; a context problem (retrieval, notes)
[ ] Is the fact there but buried?          -&amp;gt; a context problem (too much noise)
[ ] Does the tool result contain 50 KB?    -&amp;gt; a tool design problem
[ ] Does behaviour drift late in the run?  -&amp;gt; history growth; compact or split
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Fixing the right layer saves a lot of prompt rewriting.&lt;/p&gt;

&lt;h2 id=&quot;agent-memory-without-the-hype&quot;&gt;Agent memory without the hype&lt;/h2&gt;

&lt;p&gt;“Memory” for agents is, in practice, one of three things: the history inside the window, notes the
agent writes and reads, or a retrieval index over documents. All three are context-engineering
decisions about what to write, how to find it again and when to drop it. Stale notes are as harmful as
stale documentation, so give them an owner and an expiry rule.&lt;/p&gt;

&lt;h2 id=&quot;key-takeaways&quot;&gt;Key takeaways&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Treat context as a finite budget; aim for the smallest set of high-signal tokens.&lt;/li&gt;
  &lt;li&gt;Measure what fills the window: tools and history are the usual surprises.&lt;/li&gt;
  &lt;li&gt;Load tools and skills on demand, and process bulk data in code rather than through the model.&lt;/li&gt;
  &lt;li&gt;Use compaction, structured notes and sub-tasks with their own context to keep the window clean.&lt;/li&gt;
  &lt;li&gt;Diagnose whether a failure is a prompt, context or tool-design problem before rewriting anything.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents&quot;&gt;Effective context engineering for AI agents&lt;/a&gt;, Anthropic, 2025-09-29.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/code-execution-with-mcp&quot;&gt;Code execution with MCP: building more efficient AI agents&lt;/a&gt;, Anthropic, 2025-11-04.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.anthropic.com/engineering/claude-think-tool&quot;&gt;The “think” tool: Enabling Claude to stop and think&lt;/a&gt;, Anthropic, 2025-03-20.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;First published on the open-agentix blog.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">Secrets for agents never belong in the context window</title>
    <link href="https://blog.weisser.dev/blog/2026/04/02/secrets-for-agents/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-04-02T00:00:00+00:00</published>
    <updated>2026-04-02T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/04/02/secrets-for-agents/</id>
    <category term="ai" />
    <category term="agents" />
    <summary type="html">Secrets management for AI agents comes down to one rule: a credential must never enter the model’s
context window. Anything the model can read can end up in an output, a log line, a tool argument or a
transcript that someone exports. Credentials therefore live on the tool side, are injected at ca...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/04/02/secrets-for-agents/">&lt;p&gt;&lt;strong&gt;Secrets management for AI agents&lt;/strong&gt; comes down to one rule: a credential must never enter the model’s
context window. Anything the model can read can end up in an output, a log line, a tool argument or a
transcript that someone exports. Credentials therefore live on the tool side, are injected at call time
by a vault or the runtime, and the model only sees names and handles such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;crm.read&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;why-a-secret-in-the-prompt-is-a-leaked-secret&quot;&gt;Why a secret in the prompt is a leaked secret&lt;/h2&gt;

&lt;p&gt;Teams often start by pasting an API key into the system prompt or an environment description “just
for the prototype”. Look at where the text travels from there:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It is sent to the model provider with every request.&lt;/li&gt;
  &lt;li&gt;It appears in logs, traces and evaluation transcripts.&lt;/li&gt;
  &lt;li&gt;The model can repeat it, for example when asked to “show the configuration” or after an injected
instruction. An agent that reads untrusted content, as described in &lt;a href=&quot;/blog/2026/03/12/the-lethal-trifecta/&quot;&gt;the lethal
trifecta&lt;/a&gt;, can be told to send its context somewhere.&lt;/li&gt;
  &lt;li&gt;It is copied into every sub-agent prompt that inherits the context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rotating the key afterwards fixes one incident, not the habit. The safer design makes the leak
structurally impossible, because the secret was never in the text.&lt;/p&gt;

&lt;h2 id=&quot;separate-config-from-code-and-both-from-the-model&quot;&gt;Separate config from code, and both from the model&lt;/h2&gt;

&lt;p&gt;The Twelve-Factor methodology has long argued that deployment-specific values do not belong in the
code base:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;twelve-factor, which requires strict separation of config from code.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://12factor.net/config&quot;&gt;The Twelve-Factor App: III. Config&lt;/a&gt; (12factor.net)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Agents add a third layer. Prompts, skills and tool descriptions are code-like artefacts that are
versioned and reviewed; credentials are config; and the model’s context is neither. A useful mental
model has three zones:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;repository         prompts, skills, tool schemas, policies      (no secrets)
runtime config     vault paths, endpoints, per-environment      (references only)
secret store       tokens, keys, certificates                   (injected into tools)
model context      tool names, handles, task text               (never secrets)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The repository can be public. The model context can be logged for years. Only the secret store needs
the strict access regime.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/agents/secrets-for-agents-1.svg&quot; alt=&quot;Credentials stay in the tool runtime, outside the model context&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-tool-runtime-holds-the-credentials&quot;&gt;The tool runtime holds the credentials&lt;/h2&gt;

&lt;p&gt;In practice, the pattern is a thin boundary between the model and the world:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;The model asks to call a tool by name, with arguments, for example &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tickets.add_comment&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;The runtime checks the call against policy: tool, arguments, acting identity.&lt;/li&gt;
  &lt;li&gt;If allowed, the runtime fetches the credential for that one tool from the secret store, performs
the request and returns only the result.&lt;/li&gt;
  &lt;li&gt;The credential is dropped from memory after the call and is never part of the returned text.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A tool definition then references a secret by name rather than carrying its value:&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;tools&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;tickets&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tool&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;add_comment&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;credential&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;vault://agents/tickets-writer&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;# a handle, resolved by the runtime&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;     &lt;span class=&quot;pi&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;pattern&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;^SEC-&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;d+$&quot;&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;comment&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;maxLength&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;2000&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If the tool returns an error that echoes an Authorization header, scrub it before it re-enters the
context. Treat error text from tools like any other untrusted tool output.&lt;/p&gt;

&lt;h2 id=&quot;one-credential-per-tool-scoped-to-the-job&quot;&gt;One credential per tool, scoped to the job&lt;/h2&gt;

&lt;p&gt;A shared “agent token” that works everywhere defeats least privilege. Prefer:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;One credential per tool or system&lt;/strong&gt;, so a leak exposes one system, not all.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Narrow scopes&lt;/strong&gt;: read-only where the step only reads, a single project or repository instead of
the organisation.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Short lifetimes&lt;/strong&gt;: tokens that expire in minutes and are minted per run, not static keys that
live for years.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Per-identity grants&lt;/strong&gt;: the credential reflects the human or service on whose behalf the agent
acts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;OWASP states the underlying principle for prompt-injection defence directly:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Restrict the model’s access privileges to the minimum necessary for its intended operations.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://genai.owasp.org/llmrisk/llm01-prompt-injection/&quot;&gt;LLM01:2025 Prompt Injection&lt;/a&gt; (OWASP Gen AI Security Project)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The same page also recommends a human check where the stakes are high:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Implement human-in-the-loop controls for privileged operations to prevent unauthorized actions.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://genai.owasp.org/llmrisk/llm01-prompt-injection/&quot;&gt;LLM01:2025 Prompt Injection&lt;/a&gt; (OWASP Gen AI Security Project)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;token-passthrough-is-an-anti-pattern&quot;&gt;Token passthrough is an anti-pattern&lt;/h2&gt;

&lt;p&gt;A tempting shortcut is to take the token the user presented to your agent and forward it to the
downstream API. The server in the middle then acts without a real identity of its own, audit trails
point at the wrong party, and any server that accepts foreign tokens can be used as a confused
deputy. The Model Context Protocol security guidance is explicit:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;MCP servers MUST NOT accept any tokens that were not explicitly issued for the MCP server.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://modelcontextprotocol.io/specification/2025-06-18/basic/security_best_practices&quot;&gt;Security Best Practices (MCP 2025-06-18)&lt;/a&gt; (Model Context Protocol)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The same document warns against a related shortcut, using session identifiers as proof of identity:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;MCP Servers MUST NOT use sessions for authentication.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;https://modelcontextprotocol.io/specification/2025-06-18/basic/security_best_practices&quot;&gt;Security Best Practices (MCP 2025-06-18)&lt;/a&gt; (Model Context Protocol)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The fix is token exchange: the tool server authenticates the caller, then obtains its own downstream
credential, scoped for this purpose. The agent never holds the downstream token at all.&lt;/p&gt;

&lt;h2 id=&quot;an-operations-checklist&quot;&gt;An operations checklist&lt;/h2&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[ ] No secret appears in prompts, skills, tool descriptions or example transcripts
[ ] Secrets are resolved by the runtime at call time, from a vault
[ ] One credential per tool, read-only unless the step writes
[ ] Tokens are short-lived and rotated automatically
[ ] Tool errors and logs are scrubbed for Authorization headers and keys
[ ] A secret scanner runs on the repository and on exported transcripts
[ ] Incident plan: which key to revoke, in which order, who does it
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Run a scanner over transcripts as well as code. Transcripts are where leaked values show up first.&lt;/p&gt;

&lt;h2 id=&quot;limits&quot;&gt;Limits&lt;/h2&gt;

&lt;p&gt;Handles protect the model’s context, not the machine. A tool with a broad credential and a sloppy
argument schema can still do damage inside its own scope, which is why argument constraints and
approvals matter. A compromised runtime exposes every credential it can resolve, so isolate it and
give it only the secrets its tools need.&lt;/p&gt;

&lt;h2 id=&quot;key-takeaways&quot;&gt;Key takeaways&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Treat the context window as public: nothing in it should be worth stealing.&lt;/li&gt;
  &lt;li&gt;Keep credentials in the tool runtime and inject them from a vault at call time.&lt;/li&gt;
  &lt;li&gt;Use one narrow, short-lived credential per tool; never a shared agent token.&lt;/li&gt;
  &lt;li&gt;Do not pass user tokens through to downstream services; exchange them.&lt;/li&gt;
  &lt;li&gt;Scan code and transcripts for secrets, and scrub tool errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://12factor.net/config&quot;&gt;The Twelve-Factor App: III. Config&lt;/a&gt;, 12factor.net.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://modelcontextprotocol.io/specification/2025-06-18/basic/security_best_practices&quot;&gt;Security Best Practices&lt;/a&gt;, Model Context Protocol, 2025-06-18.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://genai.owasp.org/llmrisk/llm01-prompt-injection/&quot;&gt;LLM01:2025 Prompt Injection&lt;/a&gt;, OWASP Gen AI Security Project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;First published on the open-agentix blog.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">awesome-opencode: 108 Agents, 15 Skills, and a 2-Minute Setup for OpenCode</title>
    <link href="https://blog.weisser.dev/blog/2026/03/27/awesome-opencode/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-03-27T00:00:00+00:00</published>
    <updated>2026-03-27T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/03/27/awesome-opencode/</id>
    <category term="ai" />
    <category term="tools" />
    <summary type="html">Setting up OpenCode properly – agents, skills, model configuration, MCP servers, project rules – takes about 30 minutes if you read the docs and do it by hand. Or 2 minutes with one command:
</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/03/27/awesome-opencode/">&lt;p&gt;Setting up &lt;a href=&quot;https://opencode.ai&quot;&gt;OpenCode&lt;/a&gt; properly – agents, skills, model configuration, MCP servers, project rules – takes about 30 minutes if you read the docs and do it by hand. Or 2 minutes with one command:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npx @weisser-dev/awesome-opencode
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/weisser-dev/awesome-opencode&quot;&gt;awesome-opencode&lt;/a&gt; is an interactive CLI tool and template collection that analyzes your project, recommends the right configuration, and generates everything OpenCode needs to work well with your stack. 108 agents across 10 categories, 15 skills, 18 curated MCP servers, smart model detection, and an auto-generated AGENTS.md – all from a single &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;npx&lt;/code&gt; command.&lt;/p&gt;

&lt;h2 id=&quot;why-this-exists&quot;&gt;Why this exists&lt;/h2&gt;

&lt;p&gt;OpenCode is powerful, but the configuration surface is large. You need to decide which agents to install, how to write skill definitions, which MCP servers to connect, how to assign models to different agent tiers, and what project rules to define in AGENTS.md. Most of this requires reading multiple documentation pages, and the result is that many teams either skip configuration entirely or set up a minimal config that doesn’t take advantage of what OpenCode can do.&lt;/p&gt;

&lt;p&gt;The specific problems I wanted to solve:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Agent discovery.&lt;/strong&gt; With 108 available agents across 10 categories, knowing which ones are relevant to a Terraform-heavy infrastructure project versus a React frontend is not obvious. The tool scans your project files (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.tf&lt;/code&gt; maps to Terraform, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.rs&lt;/code&gt; to Rust, and so on for 28 language/technology mappings) and recommends agents with reason tags explaining why – &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(Terraform (IaC))&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(Docker / Containers)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(default)&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Model optimization.&lt;/strong&gt; Using the same frontier model for every agent is expensive and unnecessary. A code-writing agent needs Opus or GPT-5.2, but a context manager or documentation agent runs fine on Haiku or Flash. Configuring this per agent manually is tedious. The tool detects your existing models, benchmarks them, and assigns the right tier automatically.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;MCP server fragmentation.&lt;/strong&gt; MCP servers are scattered across &lt;a href=&quot;https://mcp.so&quot;&gt;mcp.so&lt;/a&gt;, GitHub repositories, and the &lt;a href=&quot;https://registry.modelcontextprotocol.io&quot;&gt;official registry&lt;/a&gt;. The tool curates 18 servers filtered by your project languages, plus live search against the official MCP Registry API.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;AGENTS.md.&lt;/strong&gt; Project rules are one of the most impactful things you can configure, but writing them from scratch for every project is the kind of task that gets deferred forever.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;how-it-works&quot;&gt;How it works&lt;/h2&gt;

&lt;p&gt;The CLI follows a linear flow that takes about two minutes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Language detection.&lt;/strong&gt; Auto-detects languages by scanning file extensions in your project root. You can also select manually for fresh projects with no files yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Agent selection.&lt;/strong&gt; Presents all 108 agents organized by category – Core Development, Language Specialists, Infrastructure, Quality &amp;amp; Security, Data &amp;amp; AI, Developer Experience, Specialized Domains, Business &amp;amp; Product, Meta &amp;amp; Orchestration, Research &amp;amp; Analysis. Agents recommended for your detected languages appear first with reason tags.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Skill selection.&lt;/strong&gt; 15 skills covering common workflows: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git-release&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pr-review&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;migration&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;test-patterns&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;deploy&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dependency-audit&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;incident-postmortem&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docker-optimize&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;adr-write&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;api-contract&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;changelog-generate&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ci-pipeline&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;env-setup&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;error-triage&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;performance-profile&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Model strategy.&lt;/strong&gt; Reads your existing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;opencode.json&lt;/code&gt;, fingerprints every configured model (even through custom Bedrock or Azure provider prefixes like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;eu.anthropic.claude-opus-4-6-v1&lt;/code&gt;), shows coding benchmarks on a 0–100 scale and cost tiers from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$$$$$&lt;/code&gt;, then offers to auto-optimize: frontier models for code-writing agents, strong models for review agents, fast models for context and exploration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. MCP servers.&lt;/strong&gt; Curated list filtered by your languages, plus an optional live search against &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;registry.modelcontextprotocol.io&lt;/code&gt; to find and configure any registered server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Step limits.&lt;/strong&gt; Optional per-agent step limits for cost control – code-writing agents get unlimited steps, review agents get 10–15, fast agents get 5–10.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Generation.&lt;/strong&gt; Writes &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.opencode/agents/*.md&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.opencode/skills/*/SKILL.md&lt;/code&gt;, updates &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;opencode.json&lt;/code&gt;, creates &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.opencode/advanced.json&lt;/code&gt; (state for re-runs), and generates &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AGENTS.md&lt;/code&gt; with project-specific rules.&lt;/p&gt;

&lt;p&gt;On re-run, the tool detects the existing configuration and offers to start OpenCode directly or reconfigure.&lt;/p&gt;

&lt;h2 id=&quot;model-fingerprinting&quot;&gt;Model fingerprinting&lt;/h2&gt;

&lt;p&gt;The part I find most technically interesting is the model detection. LLM provider IDs rarely follow a consistent naming convention. If you use Amazon Bedrock, your model ID might be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;abcd/eu.anthropic.claude-opus-4-6-v1&lt;/code&gt;. Azure has its own format. Self-hosted endpoints use whatever the operator decided. But the tool still needs to know that this is Claude Opus 4 so it can look up the benchmark score and assign the right agent tier.&lt;/p&gt;

&lt;p&gt;The solution is 26 model fingerprints – regex patterns that extract the canonical model identity from any provider-prefixed ID. The fingerprinting covers Anthropic (Claude), OpenAI (GPT, o-series), Google (Gemini), DeepSeek, Meta (Llama), and Mistral. Each fingerprint maps to a tier (frontier, strong, fast), a cost bracket, and a coding benchmark score sourced from &lt;a href=&quot;https://pricepertoken.com/leaderboards/coding&quot;&gt;pricepertoken.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The auto-optimize strategy then maps agent types to tiers:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Agent type&lt;/th&gt;
      &lt;th&gt;Model tier&lt;/th&gt;
      &lt;th&gt;Step limit&lt;/th&gt;
      &lt;th&gt;Example&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Code-writing, language specialists&lt;/td&gt;
      &lt;td&gt;Frontier&lt;/td&gt;
      &lt;td&gt;Unlimited&lt;/td&gt;
      &lt;td&gt;Opus, GPT-5.2, o3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Code review, architecture, security&lt;/td&gt;
      &lt;td&gt;Strong&lt;/td&gt;
      &lt;td&gt;10–15&lt;/td&gt;
      &lt;td&gt;Sonnet, GPT-5.1&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Exploration, docs, context management&lt;/td&gt;
      &lt;td&gt;Fast&lt;/td&gt;
      &lt;td&gt;5–10&lt;/td&gt;
      &lt;td&gt;Haiku, Flash, mini&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;This means you can run 20+ agents without paying frontier prices for all of them, while the agents that actually write and review code still get the best models available.&lt;/p&gt;

&lt;h2 id=&quot;the-108-agents&quot;&gt;The 108 agents&lt;/h2&gt;

&lt;p&gt;Every agent is a markdown file with YAML frontmatter defining the description, mode, model tier, temperature, permissions, and step limit. The categories:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Core Development&lt;/strong&gt; (8) – API design, backend, frontend, fullstack, GraphQL, microservices, mobile, WebSocket&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Language Specialists&lt;/strong&gt; (22) – Angular through Vue, covering the major languages and frameworks with specialist knowledge&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Infrastructure&lt;/strong&gt; (13) – cloud architecture, Kubernetes, Terraform, Docker, SRE, incident response&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Quality &amp;amp; Security&lt;/strong&gt; (11) – code review, penetration testing, compliance, accessibility, chaos engineering&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Data &amp;amp; AI&lt;/strong&gt; (12) – data engineering, ML, LLM architecture, prompt engineering, NLP&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Developer Experience&lt;/strong&gt; (11) – build systems, CLI tools, documentation, refactoring, testing&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Specialized Domains&lt;/strong&gt; (8) – blockchain, embedded systems, fintech, game development, IoT&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Business &amp;amp; Product&lt;/strong&gt; (9) – product management, technical writing, UX research, scrum&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Meta &amp;amp; Orchestration&lt;/strong&gt; (7) – multi-agent coordination, context management, workflow automation&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Research &amp;amp; Analysis&lt;/strong&gt; (7) – competitive analysis, market research, trend forecasting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent collection is adapted from &lt;a href=&quot;https://github.com/VoltAgent/awesome-claude-code-subagents&quot;&gt;VoltAgent/awesome-claude-code-subagents&lt;/a&gt;, reworked for OpenCode’s markdown agent format with permissions, skill integration, and tier assignments.&lt;/p&gt;

&lt;h2 id=&quot;technical-details&quot;&gt;Technical details&lt;/h2&gt;

&lt;p&gt;The CLI is pure ESM Node.js – no TypeScript compilation, no build step. The core logic lives in a single &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setup.js&lt;/code&gt; file of about 1,800 lines. Agent and skill templates are plain markdown files stored in the repo’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;templates/&lt;/code&gt; directory, not embedded strings, which means they’re easy to review, edit, and contribute to.&lt;/p&gt;

&lt;p&gt;Dependencies are minimal: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;@inquirer/prompts&lt;/code&gt; for interactive selection, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chalk&lt;/code&gt; for terminal colors, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ora&lt;/code&gt; for spinners. A &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;prepublishOnly&lt;/code&gt; script syncs templates from the repo root into the npm package before publishing. CI validates that the agent count stays at 108+, the skill count at 15+, templates are in sync, and syntax is correct.&lt;/p&gt;

&lt;h2 id=&quot;getting-started&quot;&gt;Getting started&lt;/h2&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npx @weisser-dev/awesome-opencode
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That’s it. If you want to install globally instead:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-g&lt;/span&gt; @weisser-dev/awesome-opencode
awesome-opencode
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For manual setup without the CLI – copying individual agent and skill templates – see the &lt;a href=&quot;https://github.com/weisser-dev/awesome-opencode#manual-setup-without-cli&quot;&gt;README&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;contributing&quot;&gt;Contributing&lt;/h2&gt;

&lt;p&gt;The project is MIT-licensed and welcomes contributions. The most useful additions right now are new agent templates (add a markdown file to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;templates/agents/&lt;/code&gt; and register it in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AVAILABLE_AGENTS&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setup.js&lt;/code&gt;), new skill definitions (add a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SKILL.md&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;templates/skills/&amp;lt;name&amp;gt;/&lt;/code&gt; and register in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AVAILABLE_SKILLS&lt;/code&gt;), model fingerprints for new providers, and MCP server recommendations.&lt;/p&gt;

&lt;h2 id=&quot;credits&quot;&gt;Credits&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/VoltAgent/awesome-claude-code-subagents&quot;&gt;VoltAgent/awesome-claude-code-subagents&lt;/a&gt; – the 127+ agent collection that served as the primary inspiration, adapted for OpenCode’s format&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/darrenhinde/OpenAgentsControl&quot;&gt;darrenhinde/OpenAgentsControl&lt;/a&gt; – agent configuration patterns&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://opencode.ai/docs/&quot;&gt;OpenCode Docs&lt;/a&gt; – agents, skills, MCP, permissions, and configuration reference&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://pricepertoken.com/leaderboards/coding&quot;&gt;pricepertoken.com&lt;/a&gt; – model benchmark rankings and pricing data&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://registry.modelcontextprotocol.io&quot;&gt;registry.modelcontextprotocol.io&lt;/a&gt; – official MCP server registry API&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://mcp.so&quot;&gt;mcp.so&lt;/a&gt; – community MCP server directory&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">opencode-remote-telegram: Control OpenCode from Your Phone via Telegram</title>
    <link href="https://blog.weisser.dev/blog/2026/03/25/opencode-remote-telegram/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-03-25T00:00:00+00:00</published>
    <updated>2026-03-25T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/03/25/opencode-remote-telegram/</id>
    <category term="projects" />
    <category term="ai" />
    <summary type="html">opencode-remote-telegram is a Telegram bot that lets you control OpenCode from your phone. Pick a project, pick a model, type what you want — the agent works, you get the formatted result.
</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/03/25/opencode-remote-telegram/">&lt;p&gt;&lt;a href=&quot;https://github.com/weisser-dev/opencode-remote-telegram&quot;&gt;opencode-remote-telegram&lt;/a&gt; is a Telegram bot that lets you control &lt;a href=&quot;https://opencode.ai&quot;&gt;OpenCode&lt;/a&gt; from your phone. Pick a project, pick a model, type what you want — the agent works, you get the formatted result.&lt;/p&gt;

&lt;h2 id=&quot;the-origin-story&quot;&gt;The origin story&lt;/h2&gt;

&lt;p&gt;The project was inspired by &lt;a href=&quot;https://github.com/RoundTable02/remote-opencode&quot;&gt;RoundTable02/remote-opencode&lt;/a&gt;, a Discord bot for remote OpenCode access. The goal: take the concept, build a clean Telegram-native version with proper UX. It turned into a full rewrite — per-instance auth, SSE event handling, inline keyboards, persistent state, and a system prompt that teaches the model to format its output for Telegram.&lt;/p&gt;

&lt;h2 id=&quot;how-it-works&quot;&gt;How it works&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Your Phone (Telegram)
        │
        ▼
opencode-remote-telegram
        │  spawns per project, on demand
        │  per-instance random Basic Auth
        │  idle timeout: 10 min
        ▼
opencode serve  (HTTP API + SSE)
        │
        ▼
Your Codebase
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The bot spawns &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;opencode serve&lt;/code&gt; in your project directory when you start a coding session. Each instance gets a randomly generated password. Prompts are sent with a system prefix that instructs the model to format output for Telegram (no markdown tables, short paragraphs, code in fenced blocks). Responses are collected silently while witty loading messages rotate, then delivered as properly formatted HTML.&lt;/p&gt;

&lt;h2 id=&quot;install&quot;&gt;Install&lt;/h2&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-g&lt;/span&gt; @weisser-dev/opencode-remote-telegram
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;setup&quot;&gt;Setup&lt;/h2&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;opencode-remote-telegram setup
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The wizard walks you through four steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Telegram Bot Token&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Open Telegram → search for &lt;strong&gt;@BotFather&lt;/strong&gt; → &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/newbot&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Copy the token (looks like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1234567890:ABCdef…&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Access control&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Message &lt;strong&gt;@userinfobot&lt;/strong&gt; to find your Telegram user ID&lt;/li&gt;
  &lt;li&gt;Enter your ID to restrict access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Projects base directory&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Point to your projects folder — subdirectories are auto-discovered&lt;/li&gt;
  &lt;li&gt;Example: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/Projects&lt;/code&gt; → discovers &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/Projects/my-app&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/Projects/api&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. OpenCode config&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Recommended: use a single global &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;opencode.json&lt;/code&gt; for all projects&lt;/li&gt;
  &lt;li&gt;Place it at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/opencode-remote-telegram/opencode.json&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;This prevents project-level configs from overriding credentials&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;verify-the-setup&quot;&gt;Verify the setup&lt;/h2&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;opencode-remote-telegram &lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This checks: config loaded, projects found, models loaded, server starts, test prompt gets a response.&lt;/p&gt;

&lt;h2 id=&quot;start-the-bot&quot;&gt;Start the bot&lt;/h2&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;opencode-remote-telegram start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On first &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/start&lt;/code&gt; in Telegram, the bot shows an onboarding with inline buttons: pick a project, pick a model, start coding.&lt;/p&gt;

&lt;h2 id=&quot;commands&quot;&gt;Commands&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Projects&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/list_projects&lt;/code&gt; — inline keyboard, tap to switch&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/new_project&lt;/code&gt; — clone a GitHub repo interactively&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/switch_project &amp;lt;alias&amp;gt;&lt;/code&gt; — switch by name&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Models&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/list_models&lt;/code&gt; — inline keyboard, tap to switch&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/switch_model &amp;lt;name&amp;gt;&lt;/code&gt; — switch by name&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Coding&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/vibe_coding&lt;/code&gt; — start passthrough session&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/stop_coding&lt;/code&gt; — stop session&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/interrupt&lt;/code&gt; — interrupt running task&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/diff&lt;/code&gt; — &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git diff --stat HEAD&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/undo&lt;/code&gt; — revert last commit (soft reset, with confirmation)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stats &amp;amp; History&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/show_stats&lt;/code&gt; — token count, cost, duration after each response&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/hide_stats&lt;/code&gt; — hide stats&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/history&lt;/code&gt; — last 10 prompts with model and cost&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/costs&lt;/code&gt; — daily and weekly cost summary&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Queue&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/queue_list&lt;/code&gt; — show queued prompts&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/queue_clear&lt;/code&gt; — clear queue&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/queue_settings&lt;/code&gt; — toggle continue-on-failure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Info&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/status&lt;/code&gt; — project, model, queue, settings&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/clear&lt;/code&gt; — reset everything&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/help&lt;/code&gt; — all commands&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;the-user-experience&quot;&gt;The user experience&lt;/h2&gt;

&lt;p&gt;When you send a message while vibe coding is inactive (e.g. after a server restart), the bot offers three options:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Start &amp;amp; send this message&lt;/strong&gt; — activates vibe coding and immediately sends your text as the first prompt&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Just start coding&lt;/strong&gt; — activates vibe coding, waits for the next message&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;No&lt;/strong&gt; — shows project/model/help buttons instead&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While the agent is working (reading files, running tools), witty loading messages rotate every 4 seconds. The final response is delivered as a single formatted message — no partial streaming output, no thinking text.&lt;/p&gt;

&lt;h2 id=&quot;configuration-files&quot;&gt;Configuration files&lt;/h2&gt;

&lt;p&gt;All config lives in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/opencode-remote-telegram/&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;config.json&lt;/code&gt; — bot token, allowed users, project path&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;opencode.json&lt;/code&gt; — global OpenCode config (providers, models)&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;state.json&lt;/code&gt; — persisted state (project/model per chat, settings, history)&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;logs/&lt;/code&gt; — daily log files&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;debug-mode&quot;&gt;Debug mode&lt;/h2&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;opencode-remote-telegram &lt;span class=&quot;nt&quot;&gt;--debug&lt;/span&gt; start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Logs every incoming message, command, callback and outgoing reply with timestamps.&lt;/p&gt;

&lt;h2 id=&quot;what-this-is-a-demo-of&quot;&gt;What this is a demo of&lt;/h2&gt;

&lt;p&gt;The entire project was built with OpenCode — including the architecture decisions, the SSE event mapping, and the Telegram formatting layer. It’s a live example of AI-assisted development: describe what you want, iterate on the output, ship it.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Inspired by &lt;a href=&quot;https://github.com/RoundTable02/remote-opencode&quot;&gt;RoundTable02/remote-opencode&lt;/a&gt; — if you want OpenCode via Discord instead of Telegram, check it out.&lt;/p&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">Accidentally Committed Credentials to a Public Repo?</title>
    <link href="https://blog.weisser.dev/blog/2026/03/24/leaked-credentials/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-03-24T00:00:00+00:00</published>
    <updated>2026-03-24T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/03/24/leaked-credentials/</id>
    <category term="operations" />
    <category term="security" />
    <summary type="html">Step-by-step remediation for leaked API keys, tokens, and passwords in public Git repositories. What to do in the first 60 seconds, how to clean the history, and how to prevent it from happening again.</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/03/24/leaked-credentials/">&lt;p&gt;It happens. You paste terminal output into a blog post, commit a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.env&lt;/code&gt; file, or an AI agent includes a real credential in generated content. The secret is now in a public repository. Here is what to do.&lt;/p&gt;

&lt;h2 id=&quot;step-1-revoke-the-credential-immediately--60-seconds&quot;&gt;Step 1: Revoke the credential immediately (&amp;lt; 60 seconds)&lt;/h2&gt;

&lt;p&gt;This is the only step that actually stops the damage. Do it before anything else.&lt;/p&gt;

&lt;p&gt;The credential is already compromised the moment it hits a public repo. Automated scanners like &lt;a href=&quot;https://www.gitguardian.com/&quot;&gt;GitGuardian&lt;/a&gt;, &lt;a href=&quot;https://github.com/trufflesecurity/trufflehog&quot;&gt;truffleHog&lt;/a&gt;, and GitHub’s own secret scanning pick up new commits within seconds. Assume it has already been seen.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Credential type&lt;/th&gt;
      &lt;th&gt;How to revoke&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Telegram Bot Token&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;@BotFather&lt;/code&gt; → &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/mybots&lt;/code&gt; → select bot → &lt;strong&gt;API Token&lt;/strong&gt; → &lt;strong&gt;Revoke&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;GitHub Personal Access Token&lt;/td&gt;
      &lt;td&gt;Settings → Developer settings → Personal access tokens → Delete&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;OpenAI API Key&lt;/td&gt;
      &lt;td&gt;platform.openai.com → API keys → Delete&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;AWS Access Key&lt;/td&gt;
      &lt;td&gt;IAM → Users → Security credentials → Deactivate + Delete&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Discord Bot Token&lt;/td&gt;
      &lt;td&gt;Developer Portal → Application → Bot → &lt;strong&gt;Reset Token&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Generic API key&lt;/td&gt;
      &lt;td&gt;Check the provider’s dashboard — every service has a revoke/rotate option&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;After revoking, generate a new credential and store it properly (see &lt;a href=&quot;#step-4-store-secrets-properly-going-forward&quot;&gt;Step 4&lt;/a&gt;).&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;step-2-remove-it-from-the-current-content&quot;&gt;Step 2: Remove it from the current content&lt;/h2&gt;

&lt;p&gt;Fix the file that contains the secret right now. Replace the real value with a placeholder:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Before&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;OPENCODE_SERVER_PASSWORD&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;fd691649-311e-4418-98fa-6a0e21a2659b

&lt;span class=&quot;c&quot;&gt;# After&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;OPENCODE_SERVER_PASSWORD&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;lt;generated-uuid&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Commit and push the fix:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git add &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
git commit &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;fix: replace leaked credential with placeholder&quot;&lt;/span&gt;
git push
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This does &lt;strong&gt;not&lt;/strong&gt; remove it from history — but it removes it from the current state and shows intent.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;step-3-wipe-the-git-history&quot;&gt;Step 3: Wipe the Git history&lt;/h2&gt;

&lt;p&gt;Deleting a commit does not delete history. Anyone who cloned or forked the repo before the fix still has the secret. GitHub also caches commit content internally.&lt;/p&gt;

&lt;p&gt;The cleanest option for a personal repo is an orphan reset — this replaces the entire history with a single new initial commit containing only the current (clean) state:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# 1. Create a new orphan branch (no history)&lt;/span&gt;
git checkout &lt;span class=&quot;nt&quot;&gt;--orphan&lt;/span&gt; clean-start

&lt;span class=&quot;c&quot;&gt;# 2. Stage everything in its current clean state&lt;/span&gt;
git add &lt;span class=&quot;nt&quot;&gt;-A&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# 3. Create a single new initial commit&lt;/span&gt;
git commit &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;initial commit&quot;&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# 4. Delete the old main branch&lt;/span&gt;
git branch &lt;span class=&quot;nt&quot;&gt;-D&lt;/span&gt; main

&lt;span class=&quot;c&quot;&gt;# 5. Rename the orphan to main&lt;/span&gt;
git branch &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; main

&lt;span class=&quot;c&quot;&gt;# 6. Force push to overwrite the remote history&lt;/span&gt;
git push &lt;span class=&quot;nt&quot;&gt;--force&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After this, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git log&lt;/code&gt; shows exactly one commit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For repositories with collaborators or forks&lt;/strong&gt;, the orphan approach is still the fastest path. Inform anyone who has a local clone — they will need to re-clone:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/you/your-repo.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;They cannot &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git pull&lt;/code&gt; after a force push that rewrites history — a fresh clone is required.&lt;/p&gt;

&lt;h3 id=&quot;alternative-bfg-repo-cleaner&quot;&gt;Alternative: BFG Repo Cleaner&lt;/h3&gt;

&lt;p&gt;If you want to keep the full history but surgically remove only the secret, &lt;a href=&quot;https://rtyley.github.io/bfg-repo-cleaner/&quot;&gt;BFG Repo Cleaner&lt;/a&gt; is faster than &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git filter-branch&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Install (macOS)&lt;/span&gt;
brew &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;bfg

&lt;span class=&quot;c&quot;&gt;# Create a file listing the secret strings to remove&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;fd691649-311e-4418-98fa-6a0e21a2659b&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; secrets.txt

&lt;span class=&quot;c&quot;&gt;# Run BFG against a bare clone&lt;/span&gt;
git clone &lt;span class=&quot;nt&quot;&gt;--mirror&lt;/span&gt; https://github.com/you/your-repo.git repo-mirror.git
bfg &lt;span class=&quot;nt&quot;&gt;--replace-text&lt;/span&gt; secrets.txt repo-mirror.git

&lt;span class=&quot;c&quot;&gt;# Clean up and force push&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;repo-mirror.git
git reflog expire &lt;span class=&quot;nt&quot;&gt;--expire&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;now &lt;span class=&quot;nt&quot;&gt;--all&lt;/span&gt;
git gc &lt;span class=&quot;nt&quot;&gt;--prune&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;now &lt;span class=&quot;nt&quot;&gt;--aggressive&lt;/span&gt;
git push &lt;span class=&quot;nt&quot;&gt;--force&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;BFG rewrites every commit that contains the string, replacing it with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;***REMOVED***&lt;/code&gt;. History is preserved but the secret is gone.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;step-4-store-secrets-properly-going-forward&quot;&gt;Step 4: Store secrets properly going forward&lt;/h2&gt;

&lt;p&gt;The root cause is almost always that a secret ended up somewhere it should not be — a blog post, a committed config file, a debug log. Here is the prevention stack:&lt;/p&gt;

&lt;h3 id=&quot;never-commit-secrets-to-git&quot;&gt;Never commit secrets to Git&lt;/h3&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.gitignore&lt;/code&gt; from the start:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# .gitignore
.env
.env.local
*.config.json
*secret*
*credentials*
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;use-a-local-config-file-pattern&quot;&gt;Use a local config file pattern&lt;/h3&gt;

&lt;p&gt;For project configs that contain tokens, keep the real file gitignored and commit only a template:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;remote-opencode.config.json       # gitignored, contains real token
remote-opencode.config.example.json  # committed, contains placeholders
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;use-environment-variables&quot;&gt;Use environment variables&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;TELEGRAM_BOT_TOKEN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;your-token&quot;&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# or in .env (gitignored):&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;TELEGRAM_BOT_TOKEN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;your-token
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;use-a-secret-manager-for-teams&quot;&gt;Use a secret manager for teams&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://developer.1password.com/docs/cli/&quot;&gt;1Password Secrets Automation&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.vaultproject.io/&quot;&gt;HashiCorp Vault&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://aws.amazon.com/secrets-manager/&quot;&gt;AWS Secrets Manager&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions&quot;&gt;GitHub Actions Secrets&lt;/a&gt; for CI/CD&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;enable-github-secret-scanning&quot;&gt;Enable GitHub secret scanning&lt;/h3&gt;

&lt;p&gt;In your repo settings: &lt;strong&gt;Security&lt;/strong&gt; → &lt;strong&gt;Secret scanning&lt;/strong&gt; → Enable. GitHub will alert you if a known secret pattern appears in a push before it causes damage.&lt;/p&gt;

&lt;h3 id=&quot;add-pre-commit-hooks&quot;&gt;Add pre-commit hooks&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/Yelp/detect-secrets&quot;&gt;detect-secrets&lt;/a&gt; or &lt;a href=&quot;https://github.com/gitleaks/gitleaks&quot;&gt;gitleaks&lt;/a&gt; scan your staged changes before every commit:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Install gitleaks (macOS)&lt;/span&gt;
brew &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;gitleaks

&lt;span class=&quot;c&quot;&gt;# Scan your repo&lt;/span&gt;
gitleaks detect &lt;span class=&quot;nt&quot;&gt;--source&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Add as pre-commit hook&lt;/span&gt;
gitleaks protect &lt;span class=&quot;nt&quot;&gt;--staged&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;for-ai-agents-a-note&quot;&gt;For AI agents: a note&lt;/h2&gt;

&lt;p&gt;If you are an AI agent writing documentation, blog posts, or code — &lt;strong&gt;never include real credential values&lt;/strong&gt;, even when quoting terminal output or debugging logs. Always replace with placeholders like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;your-token&amp;gt;&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;generated-uuid&amp;gt;&lt;/code&gt;, or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;***&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;../../AGENTS.md&quot;&gt;AGENTS.md&lt;/a&gt; for the full rules.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;checklist&quot;&gt;Checklist&lt;/h2&gt;

&lt;p&gt;When you find a leaked credential:&lt;/p&gt;

&lt;ul class=&quot;task-list&quot;&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Revoke the credential immediately&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Fix the current file (replace with placeholder)&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Commit and push the fix&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Wipe Git history (orphan reset or BFG)&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Force push&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Notify anyone who may have cloned the repo&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Generate a new credential and store it securely&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.gitignore&lt;/code&gt; rules to prevent recurrence&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;Consider enabling GitHub secret scanning&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry xml:lang="en">
    <title type="html">My Typical Frontend Hosting Setup: Strato + Cloudflare + Pages</title>
    <link href="https://blog.weisser.dev/blog/2026/03/24/frontend-hosting-cloudflare-pages/" rel="alternate" type="text/html" hreflang="en" />
    <published>2026-03-24T00:00:00+00:00</published>
    <updated>2026-03-24T00:00:00+00:00</updated>
    <id>https://blog.weisser.dev/blog/2026/03/24/frontend-hosting-cloudflare-pages/</id>
    <category term="operations" />
    <category term="devops" />
    <summary type="html">Every frontend project I ship — agentic-ai.weisser.dev, scrumbuddy.org, cv.weisser.dev and others — follows the same hosting pattern: domain registered at Strato, DNS managed by Cloudflare, site deployed via Cloudflare Pages. It’s free, automatic, and takes about 10 minutes to set up the first ti...</summary>
    <content type="html" xml:base="https://blog.weisser.dev/blog/2026/03/24/frontend-hosting-cloudflare-pages/">&lt;p&gt;Every frontend project I ship — &lt;a href=&quot;https://agentic-ai.weisser.dev&quot;&gt;agentic-ai.weisser.dev&lt;/a&gt;, &lt;a href=&quot;https://scrumbuddy.org&quot;&gt;scrumbuddy.org&lt;/a&gt;, &lt;a href=&quot;https://cv.weisser.dev&quot;&gt;cv.weisser.dev&lt;/a&gt; and others — follows the same hosting pattern: domain registered at Strato, DNS managed by Cloudflare, site deployed via Cloudflare Pages. It’s free, automatic, and takes about 10 minutes to set up the first time.&lt;/p&gt;

&lt;h2 id=&quot;the-stack&quot;&gt;The stack&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Strato&lt;/strong&gt; — domain registrar. That’s all it does in this setup.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Cloudflare&lt;/strong&gt; — DNS, SSL, CDN, and the actual hosting via Cloudflare Pages.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;GitHub&lt;/strong&gt; — source of truth. Every push triggers a build and deploy automatically.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Vite&lt;/strong&gt; (or any static site generator) — the build tool. Output goes to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dist/&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;step-1-point-your-strato-domain-to-cloudflare&quot;&gt;Step 1: Point your Strato domain to Cloudflare&lt;/h2&gt;

&lt;p&gt;Log in to Strato, go to your domain settings and change the nameservers to the two Cloudflare nameservers assigned to your account. They look like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;*.ns.cloudflare.com&lt;/code&gt; — you’ll find the exact values in your Cloudflare dashboard under &lt;strong&gt;DNS &amp;gt; Nameservers&lt;/strong&gt; after adding the domain there.&lt;/p&gt;

&lt;p&gt;In Cloudflare: &lt;strong&gt;Add a site&lt;/strong&gt; → enter your domain → choose the free plan → Cloudflare scans your existing DNS records → you confirm and note down the two nameserver addresses → go back to Strato and enter them.&lt;/p&gt;

&lt;p&gt;DNS propagation takes a few minutes to a few hours. Once it’s done, Cloudflare controls everything.&lt;/p&gt;

&lt;h2 id=&quot;step-2-create-a-cloudflare-pages-project&quot;&gt;Step 2: Create a Cloudflare Pages project&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Heads up:&lt;/strong&gt; If you navigate to &lt;strong&gt;Workers &amp;amp; Pages&lt;/strong&gt; in the Cloudflare dashboard and click &lt;strong&gt;Create&lt;/strong&gt;, you’ll land on the Workers tab by default. Don’t start creating a Worker — look for the small link that says something like &lt;strong&gt;“Looking for Pages? Create a Pages project here”&lt;/strong&gt; (or similar wording, Cloudflare changes this occasionally). Click that to get to the actual Pages setup. This trips up almost everyone the first time.&lt;/p&gt;

&lt;p&gt;Go to &lt;a href=&quot;https://pages.cloudflare.com&quot;&gt;pages.cloudflare.com&lt;/a&gt; → &lt;strong&gt;Create a project&lt;/strong&gt; → &lt;strong&gt;Connect to Git&lt;/strong&gt; → authorize Cloudflare to access your GitHub account → select the repository.&lt;/p&gt;

&lt;p&gt;Configure the build settings:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Setting&lt;/th&gt;
      &lt;th&gt;Value&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Branch&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Build command&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;npm run build&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Build output directory&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dist&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;For plain HTML/CSS/JS with no build step, leave the build command empty and set the output directory to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Click &lt;strong&gt;Save and Deploy&lt;/strong&gt;. Cloudflare clones the repo, runs the build, and publishes to a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;*.pages.dev&lt;/code&gt; URL in under a minute.&lt;/p&gt;

&lt;h2 id=&quot;step-3-add-your-custom-domain&quot;&gt;Step 3: Add your custom domain&lt;/h2&gt;

&lt;p&gt;In your Pages project, go to &lt;strong&gt;Custom domains&lt;/strong&gt; → &lt;strong&gt;Set up a custom domain&lt;/strong&gt; → enter your domain (e.g. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;agentic-ai.weisser.dev&lt;/code&gt;). Since your domain is already on Cloudflare, it creates the DNS record automatically and provisions SSL via Let’s Encrypt within minutes.&lt;/p&gt;

&lt;p&gt;That’s it. The next &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git push&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt; will automatically trigger a new build and deploy. No CI pipeline to maintain, no server to manage, no bill at the end of the month.&lt;/p&gt;

&lt;h2 id=&quot;why-this-works-well&quot;&gt;Why this works well&lt;/h2&gt;

&lt;p&gt;The thing I like most about this setup is how little there is to think about once it’s running. Cloudflare handles SSL renewal, CDN caching, DDoS protection, and deployment all in one place. The free tier is genuinely generous for personal projects and small tools — unlimited bandwidth, 500 builds per month, custom domains included.&lt;/p&gt;

&lt;p&gt;The only thing Strato does in this setup is hold the domain registration. If you’re registering a new domain, you could also register it directly in Cloudflare and skip the nameserver step entirely — but for domains you already have elsewhere, the nameserver delegation works just as well.&lt;/p&gt;

&lt;h2 id=&quot;why-cloudflare-pages-over-github-pages&quot;&gt;Why Cloudflare Pages over GitHub Pages&lt;/h2&gt;

&lt;p&gt;Both are free for static sites, but Cloudflare Pages has two advantages that matter in practice:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Private repos work for free.&lt;/strong&gt; GitHub Pages requires a public repository on the free plan — if you want to deploy from a private repo, you need GitHub Pro or a GitHub Team/Enterprise plan. Cloudflare Pages deploys from private repos at no cost.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Every commit gets its own preview URL.&lt;/strong&gt; Each push — not just to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt;, but to any branch or pull request — gets a unique &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;commit-hash&amp;gt;.pages.dev&lt;/code&gt; URL. This makes it trivial to review changes, share previews with others, or roll back to any previous deployment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For public open-source sites where the source doesn’t need to be private, GitHub Pages works fine. For everything else — side projects, client work, internal tools — Cloudflare Pages is the better choice.&lt;/p&gt;

&lt;h2 id=&quot;reference&quot;&gt;Reference&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dilatchi/cloudflare-static-site-demo&quot;&gt;dilatchi/cloudflare-static-site-demo&lt;/a&gt; — a clean tutorial repo that walks through the same steps with screenshots&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://pages.cloudflare.com&quot;&gt;pages.cloudflare.com&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
</feed>

