<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Samuel Diniz Casimiro</title>
    <description>The latest articles on DEV Community by Samuel Diniz Casimiro (@samueldc).</description>
    <link>https://dev.to/samueldc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F308931%2F6e303460-7a95-4022-87c1-2e65e0fe48ce.jpg</url>
      <title>DEV Community: Samuel Diniz Casimiro</title>
      <link>https://dev.to/samueldc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samueldc"/>
    <language>en</language>
    <item>
      <title>Running an issue-fixing agent on a $6 Fly Machine: a queue, three budgets, and an honest test report</title>
      <dc:creator>Samuel Diniz Casimiro</dc:creator>
      <pubDate>Mon, 02 Nov 2026 14:21:48 +0000</pubDate>
      <link>https://dev.to/samueldc/running-an-issue-fixing-agent-on-a-6-fly-machine-a-queue-three-budgets-and-an-honest-test-report-428o</link>
      <guid>https://dev.to/samueldc/running-an-issue-fixing-agent-on-a-6-fly-machine-a-queue-three-budgets-and-an-honest-test-report-428o</guid>
      <description>&lt;p&gt;Most "AI fixes your issues" demos are a session: you run a CLI, it edits files, you look at the diff. I wanted the opposite: a &lt;strong&gt;standing service&lt;/strong&gt; that sits next to a repository, picks up issues labeled &lt;code&gt;bug&lt;/code&gt;, &lt;code&gt;docs&lt;/code&gt; or &lt;code&gt;chore&lt;/code&gt;, and opens a pull request — and that I can leave running without watching my LLM bill.&lt;/p&gt;

&lt;p&gt;That's &lt;a href="https://github.com/stateway-io/fly-swe" rel="noopener noreferrer"&gt;fly-swe&lt;/a&gt;, built on &lt;a href="https://github.com/SWE-agent/mini-swe-agent" rel="noopener noreferrer"&gt;mini-swe-agent&lt;/a&gt;. Here's how it's put together, and what it cost on a real TypeScript monorepo.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe2q8urhegdwl6z6j6ot8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe2q8urhegdwl6z6j6ot8.gif" alt="demo" width="799" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  One Machine, one process pair, one SQLite file
&lt;/h3&gt;

&lt;p&gt;The whole thing is a FastAPI webhook receiver and a worker, run together by &lt;code&gt;honcho&lt;/code&gt; on a single shared-cpu-1x Fly Machine with a 1 GB volume. Webhooks are verified (HMAC, timing-safe, fail-closed on an empty secret), de-duplicated by delivery ID, and written to a SQLite queue in WAL mode on the volume. The worker polls it.&lt;/p&gt;

&lt;p&gt;No Postgres, no Redis, no broker. If the Machine restarts mid-task, orphan recovery picks the task back up: nothing lost, nothing run twice. The infra costs around $6/month.&lt;/p&gt;

&lt;h3&gt;
  
  
  The LLM never touches git
&lt;/h3&gt;

&lt;p&gt;This is the invariant I care most about. The coding agent edits files and leaves them in the working tree. Then it emits a completion signal, and &lt;strong&gt;everything after that belongs to the harness&lt;/strong&gt;: &lt;code&gt;git add&lt;/code&gt;, commit, push and PR. The agent's shell gets a tokenless remote, no push credential, no &lt;code&gt;gh&lt;/code&gt;, and an env allowlist with no secrets.&lt;/p&gt;

&lt;p&gt;A side effect: when the target repo's &lt;code&gt;AGENTS.md&lt;/code&gt; says "commit and open a PR", the agent follows it for style and tests but not for git, so nothing goes sideways.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three budgets, enforced in code
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;max_iterations&lt;/code&gt;: a hard cap on agent steps&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;max_cost_per_task_usd&lt;/code&gt;: per task&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;max_daily_cost_usd&lt;/code&gt;: per repo per day&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;cost_tracking: strict&lt;/code&gt; goes one step further: if a step can't be priced, it isn't run.&lt;/p&gt;

&lt;p&gt;When a run hits a limit, it doesn't just die. It force-pushes its partial work to a WIP branch, and the next trigger resumes from there, along with a summary of what was already tried. That summary costs zero LLM tokens.&lt;/p&gt;

&lt;h3&gt;
  
  
  "How I tested" is what the harness saw, not what the model said
&lt;/h3&gt;

&lt;p&gt;After the agent's loop ends, the harness &lt;strong&gt;re-runs the test command the agent says it used&lt;/strong&gt;, in the same environment. The PR's "How I tested" checkbox reflects that run. Anything the agent couldn't run (say, a suite that needs a database the sandbox lacks) is listed separately, labeled as the agent's report, and never checked off.&lt;/p&gt;

&lt;p&gt;If verification fails, the harness says so on the issue and retries automatically. That happened on 3 of the 10 issues below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Numbers from a real repo
&lt;/h3&gt;

&lt;p&gt;10 consecutive issues (bugs and docs) on a TypeScript monorepo with an SDK and a docs site, using GLM-5.3:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;median cost per issue: &lt;strong&gt;~$0.31&lt;/strong&gt;; worst case $1.85 (225 iterations, two verification retries)&lt;/li&gt;
&lt;li&gt;typical run: ~80 iterations&lt;/li&gt;
&lt;li&gt;all 10 PRs were reviewed by a human before merge. fly-swe never merges.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What it isn't (yet)
&lt;/h3&gt;

&lt;p&gt;Execution isn't sandboxed: the agent's commands run as a subprocess in the same container, mitigated by the env allowlist and the absence of credentials (&lt;a href="https://github.com/stateway-io/fly-swe/blob/main/SECURITY.md" rel="noopener noreferrer"&gt;SECURITY.md&lt;/a&gt;). A per-task sandbox is next on the roadmap. Ephemeral Fly Machines / Sprites are an obvious candidate.&lt;/p&gt;

&lt;p&gt;GitHub is the only forge today, but it sits behind a provider plugin with a conformance suite. GitLab or Gitea would be a good first contribution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deploy in ~10 minutes:&lt;/strong&gt; &lt;a href="https://github.com/stateway-io/fly-swe#quickstart--deploy-in-10-minutes" rel="noopener noreferrer"&gt;Quickstart&lt;/a&gt; · AGPL-3.0&lt;/p&gt;

</description>
      <category>ai</category>
      <category>flyio</category>
      <category>opensource</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
