<?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: Todd Katarn</title>
    <description>The latest articles on DEV Community by Todd Katarn (@try_tex_ai).</description>
    <link>https://dev.to/try_tex_ai</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%2F4273292%2Ffb61faf0-2f72-4125-90e3-21944bcea4d2.png</url>
      <title>DEV Community: Todd Katarn</title>
      <link>https://dev.to/try_tex_ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/try_tex_ai"/>
    <language>en</language>
    <item>
      <title>Something had to give: why we ditched PRs</title>
      <dc:creator>Todd Katarn</dc:creator>
      <pubDate>Sun, 06 Dec 2026 21:49:53 +0000</pubDate>
      <link>https://dev.to/trytex/something-had-to-give-why-we-ditched-prs-4mpj</link>
      <guid>https://dev.to/trytex/something-had-to-give-why-we-ditched-prs-4mpj</guid>
      <description>&lt;p&gt;Pull requests make sense when a human opens one or two a day. Once we had a handful of coding agents working in parallel, opening a PR for every change turned CI into a parking lot.&lt;/p&gt;

&lt;p&gt;This first ran on the Tex (trytex.ai) blog. I'm posting it here too.&lt;/p&gt;

&lt;p&gt;We did it the standard way at first. Every change waited in line, ran the whole test suite, merged to main, and then ran the whole test suite all over again. We didn't mind reviewing the code, but the waiting was killing us.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we tried first
&lt;/h2&gt;

&lt;p&gt;Early on, we treated agent sessions just like human engineers. An agent finished a task, opened a PR, waited for CI, got a review, and merged. Then main kicked off another full CI run.&lt;/p&gt;

&lt;p&gt;In one two-day stretch in late November, we logged about 101 PR runs and 74 push runs. Most of those push runs were just re-testing what the PR had already passed, while every job fought over the same runners. By November 23, we had 369 PRs in a repo that was less than a month old.&lt;/p&gt;

&lt;p&gt;We also write Rust. We want Rust in production because it is fast, memory safe, and thread safe, but compiling it is brutal. Having several agents run cargo at the same time on a laptop basically melted the machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What broke
&lt;/h2&gt;

&lt;p&gt;We had already moved CI off GitHub-hosted runners and onto our own devbox after hitting a billing lock on minutes. Sharing that box between dev builds and double-run CI meant a single flake or slow job backed up everyone.&lt;/p&gt;

&lt;p&gt;We measured 14 green PR runs on November 16 to see how bad it was. On average, a &lt;code&gt;rust&lt;/code&gt; job waited 609 seconds (about 10 minutes) just to grab a runner, then ran for 211 seconds. The &lt;code&gt;docker&lt;/code&gt; job waited 636 seconds and ran for 374. The final &lt;code&gt;ci&lt;/code&gt; gate didn't even start until 1,184 seconds in, almost 20 minutes after the run began. We were spending more time waiting for a machine than actually running tests.&lt;/p&gt;

&lt;p&gt;On bad days, when agent PRs stacked up behind each other, a small change felt like it sat in line for hours. Even at the 20-minute average, running that gauntlet twice per change ate the whole day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0ujck2g3m059746deut7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0ujck2g3m059746deut7.png" alt="Before: an agent's change opens a PR, runs full CI (about 20 minutes), gets a human and agent review, merges to main, and runs full CI again (about 20 minutes). A runner took about 10 minutes to free up, so a change spent about 40 minutes in CI." width="800" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What we do now
&lt;/h2&gt;

&lt;p&gt;On November 23, we merged PR #431 ("CI: commit to main, test main in batches, release only from last-green"). We have opened zero PRs since.&lt;/p&gt;

&lt;p&gt;Here is how a change actually gets from an agent to production now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No compiling on laptops. Agents and editors stay local, but cargo never runs on the laptop. A helper copies the worktree to a shared devbox (32 vCPUs, 64 GiB RAM, local NVMe) capped at three concurrent build slots so it cannot drown itself. It starts when someone needs it and shuts down after 30 idle minutes.&lt;/li&gt;
&lt;li&gt;Agents land straight on main. An agent writes the code, runs the tests relevant to its diff, and hands the branch to an independent reviewer session to catch bugs and fix what it finds. If the work involves a real design call, the agent writes up a proposal or demo artifact and gets a human yes on the outcome instead of a line-by-line diff. Before pushing, it smoke tests the exact change in a running app. Then &lt;code&gt;scripts/push-main&lt;/code&gt; rebases on &lt;code&gt;origin/main&lt;/code&gt;, runs quick checks (clippy or deploy checks, usually a minute or two), and pushes to main. Outside contributors still use PRs.&lt;/li&gt;
&lt;li&gt;Tests stay fast. Our rule is that every test should finish in under a second when run alone, using test seams instead of real timeouts, with cargo nextest running the suite in parallel. In a recent batch, 1,208 tests finished in 37 seconds.&lt;/li&gt;
&lt;li&gt;Expensive CI runs once, in batches, on main. A push to main only triggers quick migration and release-pin checks (about 16 to 18 seconds). At most every 15 minutes, a batch job tests main's tip, running only the jobs that the diff from &lt;code&gt;last-green&lt;/code&gt; can actually break. Runner waits dropped from 10 minutes to 1 or 2 seconds. Recent batches finish in about two and a half to three minutes.&lt;/li&gt;
&lt;li&gt;Humans gate releases, not merges. One Releaser session at a time holds a release lock. It never ships main's tip. It only ships &lt;code&gt;last-green&lt;/code&gt;, and only after a person approves the release plan. If a batch goes red, a &lt;code&gt;main-red&lt;/code&gt; issue opens naming the suspect commits, pushes touching the failing job get blocked, and the session that broke it fixes it forward or reverts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa1267ck6ebfnw1wlepvf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa1267ck6ebfnw1wlepvf.png" alt="After: an agent's change runs its relevant tests, gets an independent agent review, is smoke tested in the running app, and lands with push-main. Quick checks take seconds; batch CI tests main's tip at most every 15 minutes; a green batch moves last-green, and the Releaser ships it on a person's yes. Runner waits went from about 10 minutes to 1 or 2 seconds, CI on a push to main from about 20 minutes to 16 to 18 seconds, and two full test runs per change became one batch of about 3 minutes." width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For real design work, a design artifact and human approval sit in front of the relevant tests. We don't require that for every small fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is still awkward
&lt;/h2&gt;

&lt;p&gt;There is no human reviewing code before it hits main. Humans approve designs (when there is one) and the release plan. If that makes you uneasy, it made us uneasy too. Bad commits do land on main. Between November 23 and December 6, we hit 11 &lt;code&gt;main-red&lt;/code&gt; issues. Most were fixed in 3 to 30 minutes, though two took over an hour. Main breaking isn't rare, so the whole thing depends on &lt;code&gt;last-green&lt;/code&gt; holding the line and people fixing breaks fast.&lt;/p&gt;

&lt;p&gt;The one-second test rule is also looser than it sounds. It applies when running tests one at a time, and a few tests (like evals and stall checks) are allowed to take longer. Under parallel load, nextest still flags plenty of tests as SLOW (147 of 1,208 in a recent run), and it only hard-kills a hang at 60 seconds.&lt;/p&gt;

&lt;p&gt;This also only works because we are a small team that trusts its own sessions. Outside contributors still go through normal PRs. Mitchell Hashimoto's company, Superlogical (building &lt;a href="https://www.superlogical.com/rex" rel="noopener noreferrer"&gt;Rex&lt;/a&gt;), &lt;a href="https://x.com/mitchellh/status/2120221244478083249" rel="noopener noreferrer"&gt;described a similar setup on X&lt;/a&gt; with "limited to no PRs," where everyone pushes to main with machine-aided review before and human plus machine review after, while still opening a PR when working outside their comfort zone. That exception makes a lot of sense.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where we landed
&lt;/h2&gt;

&lt;p&gt;If agents can write code as fast as they can type, a workflow built around a human opening a couple of PRs a day will spend all its time stuck in CI. Moving compiles off the laptop, keeping tests small, reviewing diffs before landing, and testing main in batches fixed the bottleneck for us. Main is allowed to go red as long as nothing red ships and the fix lands quickly.&lt;/p&gt;

&lt;p&gt;I'm Todd, I work on Tex (trytex.ai). We had to change how we ship code ourselves or our own agents would spend all day staring at CI queues. How are you handling agent-written changes now that a PR per change doesn't scale?&lt;/p&gt;

&lt;p&gt;The original post is here: &lt;a href="https://trytex.ai/blog/why-we-ditched-prs?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=no-prs-post" rel="noopener noreferrer"&gt;https://trytex.ai/blog/why-we-ditched-prs?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=no-prs-post&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>devops</category>
      <category>ai</category>
      <category>testing</category>
    </item>
    <item>
      <title>Why 'run as user' broke our scheduled AI agents (and how we keep tokens out of the sandbox)</title>
      <dc:creator>Todd Katarn</dc:creator>
      <pubDate>Mon, 30 Nov 2026 08:01:23 +0000</pubDate>
      <link>https://dev.to/trytex/why-run-as-user-broke-our-scheduled-ai-agents-and-how-we-keep-tokens-out-of-the-sandbox-1ee5</link>
      <guid>https://dev.to/trytex/why-run-as-user-broke-our-scheduled-ai-agents-and-how-we-keep-tokens-out-of-the-sandbox-1ee5</guid>
      <description>&lt;p&gt;When an agent only runs inside one person's chat window, tool auth is simple: use that person's account.&lt;/p&gt;

&lt;p&gt;The moment you put that same agent on a schedule or a feed trigger, that breaks. If an agent opens a PR or checks an issue at 7:00 AM, there is no human in the loop to borrow credentials from.&lt;/p&gt;

&lt;p&gt;We got this wrong first while building Tex, and ended up deleting our original design.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we tried first
&lt;/h2&gt;

&lt;p&gt;Our first version used per-user passthrough. On every run, the agent acted as whoever messaged or woke it.&lt;/p&gt;

&lt;p&gt;It seemed like the safe call. The agent could never do more than the person talking to it, every action traced back to a real human, and nobody had to set up a separate account. As long as a person was always starting the run from a chat window, it worked fine.&lt;/p&gt;

&lt;p&gt;It fell apart as soon as we added scheduled and feed-triggered runs. A background run has no sender, so it fell back to the agent's own account, which nobody had connected. Every GitHub call came back 403, and the console didn't tell you why.&lt;/p&gt;

&lt;p&gt;The Tools page made it worse: it showed GitHub as "Connected" because &lt;em&gt;you&lt;/em&gt; were connected, not because the agent was. Two separate settings, the tool's auth mode and the agent's trigger, decided which identity got used. The same agent could see one person's GitHub on Monday, another's on Tuesday, and fail on Wednesday morning. What it learned on one run didn't hold on the next, so its notes kept contradicting themselves.&lt;/p&gt;

&lt;p&gt;We could have patched passthrough with fallback rules, but we chose simplicity instead. Locking an agent to one permanent identity means you always know what permissions it has, and they don't shift as different people interact with it. That is a deliberate tradeoff: it fits a small team of people who trust each other sharing the same agent, not a massive organization where every user needs strict permission boundaries. We stopped asking "who is talking to the agent right now?" and started treating the agent as its own member of the team. An agent always uses its own account, and a person lends it one by connecting it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we do now
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsvvsf7gbs2j0sk5xtax7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsvvsf7gbs2j0sk5xtax7.jpg" alt="Before, an agent's tool calls used whichever person messaged or woke it. After, each agent has its own connected account for each tool." width="800" height="617"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each agent now gets one persistent account per tool, and it uses that account on every run no matter who or what started it.&lt;/p&gt;

&lt;p&gt;An admin connects the account on the agent's page, which shows the connected account or flags that it is missing. If a scheduled run tries to call a tool without a connection, it fails with an error naming the agent instead of returning a generic 403.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keeping tokens out of the sandbox
&lt;/h3&gt;

&lt;p&gt;Once an agent has persistent credentials, you don't want them sitting in the sandbox as environment variables like &lt;code&gt;GITHUB_TOKEN&lt;/code&gt;. If the agent reads an untrusted GitHub issue or email and gets talked into printing its environment, the token is gone. Instead, an admin sets each credential once on the tool's page. It lives in the org's secret store, never in &lt;code&gt;env&lt;/code&gt;, and the console only shows that it is set, who set it, when, and the last four characters.&lt;/p&gt;

&lt;p&gt;Every outbound call from the sandbox goes through a proxy running outside it. The agent makes a normal request with no secret attached, and the proxy adds the auth header on the way out. Each credential is stored with its exact destination: the tool's address, the header it belongs in, and for OAuth, the token endpoint and client. The proxy checks every call against that record, so if a prompt injection points the agent at a different host, the token doesn't go with it.&lt;/p&gt;

&lt;p&gt;For OAuth tools, we keep tokens short-lived on our side too. The proxy exchanges the client secret for an access token and holds it for a few minutes at most. If a tool returns a 401, the proxy drops the cached token and retries once with a fresh one. If that fails as well, the connection gets marked broken in the console instead of letting the agent loop on a dead token.&lt;/p&gt;

&lt;p&gt;Command-line tools that speak HTTPS directly are trickier, because the proxy has to terminate TLS to add the header. Each turn gets its own certificate authority that can only sign for that agent's tool hosts. We learned to lock that host list when the turn starts. If a new host gets added halfway through, the sandbox's CA won't trust the certificate for it.&lt;/p&gt;

&lt;p&gt;GitHub needed its own workarounds. The &lt;code&gt;gh&lt;/code&gt; CLI refuses to run without a token, so the sandbox gets a fake one. The proxy strips it and writes in the real token, as a &lt;code&gt;Bearer&lt;/code&gt; header for the API and as Basic auth with &lt;code&gt;x-access-token&lt;/code&gt; for &lt;code&gt;git&lt;/code&gt; over HTTPS, since that is what git expects.&lt;/p&gt;

&lt;p&gt;The harder problem is that GitHub OAuth has no read-only scope. The &lt;code&gt;repo&lt;/code&gt; scope that lets an agent read code also lets it push to every repo the account can reach. Because we can't rely on the scope, each tool lists the exact HTTP methods and paths it needs. The proxy attaches the token only to those, and sends everything else with no token at all. We left GraphQL out completely, since reads and writes both go through a single &lt;code&gt;POST /graphql&lt;/code&gt; endpoint and the proxy can't tell them apart.&lt;/p&gt;

&lt;p&gt;The proxy has enough lessons of its own that we may write it up in more detail in a future post.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the common setups compare
&lt;/h2&gt;

&lt;p&gt;If you are wiring up tool auth for agents, you usually land on one of four setups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Environment variables in the sandbox.&lt;/strong&gt; Fast for a local script, risky the moment the agent reads untrusted input.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-user OAuth passthrough.&lt;/strong&gt; Works for interactive, single-user assistants that should mirror the caller's permissions. Breaks down for shared or scheduled runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dedicated bot or service accounts.&lt;/strong&gt; Cleanest when a platform supports it, like a GitHub App or a Slack bot. Most SaaS tools still don't have a real bot primitive, or they make you pay for a full human seat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistent identity with an outbound proxy.&lt;/strong&gt; More plumbing up front to inject auth outside the sandbox, but permissions stay consistent across runs and raw tokens never enter the container.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is still awkward
&lt;/h2&gt;

&lt;p&gt;For most SaaS tools, giving an agent a persistent account still means having a human admin sign in with OAuth as themselves.&lt;/p&gt;

&lt;p&gt;That leaves a few messy edges. Actions taken by the agent show up in audit logs under that admin's name, the agent often inherits broader permissions than it needs, and if that admin leaves the company, the agent breaks.&lt;/p&gt;

&lt;p&gt;The ecosystem is missing a primitive here: an identity that belongs to an agent and is owned by a team.&lt;/p&gt;

&lt;p&gt;If your background agents only work when you trigger them by hand, check whose token they are actually using. How are you handling identity for agents that run on their own?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I work on Tex, where this is how agents get their accounts. A shorter version of this story is on &lt;a href="https://trytex.ai/blog/whose-account-should-an-agent-use" rel="noopener noreferrer"&gt;our blog&lt;/a&gt;. This article was written with AI assistance and checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>security</category>
      <category>oauth</category>
    </item>
  </channel>
</rss>
