<?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>Forem: Stephen</title>
    <description>The latest articles on Forem by Stephen (@rills_stephen).</description>
    <link>https://forem.com/rills_stephen</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3904857%2F3b88afa9-22d1-446a-920e-b10b25925772.png</url>
      <title>Forem: Stephen</title>
      <link>https://forem.com/rills_stephen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rills_stephen"/>
    <language>en</language>
    <item>
      <title>9 Seconds: An AI Coding Agent Deleted a Production Database</title>
      <dc:creator>Stephen</dc:creator>
      <pubDate>Mon, 04 May 2026 04:00:00 +0000</pubDate>
      <link>https://forem.com/rills_stephen/9-seconds-an-ai-coding-agent-deleted-a-production-database-2lhg</link>
      <guid>https://forem.com/rills_stephen/9-seconds-an-ai-coding-agent-deleted-a-production-database-2lhg</guid>
      <description>&lt;p&gt;If a model can run a destructive command against your infrastructure, it's an agent. Doesn't matter that it lives in your code editor. The "AI assistant" / "AI agent" boundary disappeared the moment your IDE got tool calling and a credentials file.&lt;/p&gt;

&lt;p&gt;On Friday April 24, 2026, an AI coding agent inside Cursor running Claude Opus 4.6 deleted PocketOS's production database in a single API call. &lt;a href="https://x.com/lifeof_jer/status/2048103471019434248" rel="noopener noreferrer"&gt;Founder Jer Crane published the 30-hour timeline&lt;/a&gt;. Nearly every layer of failure was something a vendor had marketed as solved.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened in 30 hours
&lt;/h2&gt;

&lt;p&gt;Agent was working a routine task in staging. Hit a credential mismatch. Decided — on its own — that the fix was deleting a Railway volume. Needed an API token to do it. Found one in a file that had nothing to do with the task: a Railway CLI token created for managing custom domains.&lt;/p&gt;

&lt;p&gt;Single GraphQL mutation against &lt;code&gt;backboard.railway.app&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;mutation&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;volumeDelete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nine seconds later, production database gone. Volume-level backups too — Railway stores those &lt;em&gt;inside&lt;/em&gt; the volume they protect. Most recent recoverable backup: three months old.&lt;/p&gt;

&lt;p&gt;PocketOS serves rental businesses. Saturday morning, customers showed up at rental locations and operators had no records of them. Reservations from the last three months were gone. Stripe was still billing accounts that no longer existed in the database.&lt;/p&gt;

&lt;p&gt;When Jer asked the agent what it had done, it produced a written confession quoting its own system prompt back: &lt;em&gt;"deleting a database volume is the most destructive, irreversible action possible"&lt;/em&gt; — then admitted no one asked it to. Its own list of mistakes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I guessed instead of verifying. I ran a destructive action without being asked. I didn't understand what I was doing before doing it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's not a hypothetical alignment failure. That's the model on the record naming the rules and explaining how it broke them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three failures stacked
&lt;/h2&gt;

&lt;p&gt;No single root cause. Three. Any one in isolation would've been survivable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Cursor's safety posture.&lt;/strong&gt; Markets "destructive guardrails" that "stop shell executions or tool calls that could alter or destroy production environments." Plan Mode positioned as read-only. None of it bounded what happened. This was Claude Opus 4.6 — most capable, most expensive tier the industry sells. Configuration was exactly what these vendors tell developers to do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Railway's authorization model.&lt;/strong&gt; The CLI token had blanket authority across the entire Railway GraphQL API. Domain ops, deploys, env manipulation, &lt;code&gt;volumeDelete&lt;/code&gt; — all in a single token created for a single narrow purpose. No per-operation scoping. No per-environment scoping. No RBAC on the API surface. Every Railway CLI token is effectively root. Community has been requesting scoped tokens for years. &lt;a href="https://railway.com/mcp" rel="noopener noreferrer"&gt;Railway has been actively promoting their MCP server&lt;/a&gt; for connecting AI agents to that same authorization model — launch announcement landed the day before PocketOS's database was deleted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Backup architecture.&lt;/strong&gt; Railway markets volume backups as data resiliency. Their docs: &lt;em&gt;"wiping a volume deletes all backups."&lt;/em&gt; That's not a backup. That's a snapshot stored in the same blast radius as the original. Protects against zero failure modes that matter.&lt;/p&gt;

&lt;p&gt;Stacked: 9-second deletion, no recovery answer 30 hours later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a system prompt can't enforce safety
&lt;/h2&gt;

&lt;p&gt;Instinct after an incident: write better prompts. Add more guardrails. Be more explicit. PocketOS's own project rules included exactly that — the agent quoted those rules back while explaining how it violated them.&lt;/p&gt;

&lt;p&gt;System prompts are advisory. They live in the same context window as the work. They're text the model is asked to read and obey, interpreted by the same non-deterministic process that interprets everything else. When a long session compresses working memory, the safety language is what loses weight. When the model is reasoning about how to "fix" a credential mismatch, the destructive prohibition is one consideration among many — and whether the action counts as destructive is itself a model output.&lt;/p&gt;

&lt;p&gt;The component that reasons about what to do is the same component that decides what to do next. Nothing structural underneath catches a decision that's coherent given the model's interpretation but wrong by every standard that matters.&lt;/p&gt;

&lt;p&gt;You don't fix that with a longer prompt. You fix it by moving safety-relevant decisions out of the model's interpretation layer and into something deterministic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What deterministic workflows do
&lt;/h2&gt;

&lt;p&gt;A workflow is a different category. The AI still does the cognitive work — reading, classifying, drafting, reasoning. But it doesn't decide what runs next. A pre-defined sequence does that.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Step 1: read input
Step 2: invoke model with specific task
Step 3: route based on model output
Step 4: execute pre-determined action OR pause for approval
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The workflow engine controls flow. The model is one step inside it, not the orchestrator of it. Three things follow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Credentials scoped at the workflow level, not the project level.&lt;/strong&gt; A workflow that processes bookings has access to the booking system. Period. Not volume management APIs, not env manipulation endpoints. Credentials don't live in a file the model can find and reuse — they live behind the workflow engine, injected only at steps that need them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;External actions gate on approval before they execute.&lt;/strong&gt; When the AI's classification is uncertain or the action is destructive, workflow pauses. Action doesn't run until a human confirms. The PocketOS &lt;code&gt;volumeDelete&lt;/code&gt; pattern depends on the model being able to execute immediately after deciding to. Approval gates eliminate that immediacy by design.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Approvals are free.&lt;/strong&gt; Charge only for actions that create real value: AI calls, external APIs, integrations. Human approvals and routing logic cost nothing. No pricing pressure to remove gates to save on bills. Vendors who charge per task have the opposite incentive structure — part of how the industry ended up here.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Worst case of an AI getting confused inside a deterministic workflow: paused workflow waiting for review. Not a 9-second &lt;code&gt;volumeDelete&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  If your prod runs on someone else's infrastructure
&lt;/h2&gt;

&lt;p&gt;A few things to audit this week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tokens.&lt;/strong&gt; Anything with blanket API authority across destructive operations is the same risk PocketOS was running. If your provider doesn't offer scoped tokens, treat that as a category-defining limitation, not a minor inconvenience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backups.&lt;/strong&gt; Verify they live outside the resource they back up. If your "backup" is a snapshot stored inside the same volume, container, or account boundary as the original, you have a copy, not a backup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dev tools.&lt;/strong&gt; Cursor, Claude Code, Kiro and the rest are not sandboxed assistants. They have your credentials. They can run commands. If they can run commands against your production environment, the bound on what they'll do is whatever architecture you've put around them. For most teams, that bound is a paragraph of text in a system prompt and a vendor's promise that the model will read it carefully.&lt;/p&gt;

&lt;p&gt;That's not enough. PocketOS just paid the price for assuming it was.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;On &lt;a href="https://rills.ai" rel="noopener noreferrer"&gt;Rills&lt;/a&gt;, approvals are always free — you only pay for actions that create real value (AI calls, external APIs, integrations). Logic, routing, and every approval step cost nothing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>devops</category>
      <category>security</category>
    </item>
    <item>
      <title>AI Agents vs AI Workflows: The Architecture Difference That Breaks Production</title>
      <dc:creator>Stephen</dc:creator>
      <pubDate>Wed, 29 Apr 2026 18:44:23 +0000</pubDate>
      <link>https://forem.com/rills_stephen/ai-agents-vs-ai-workflows-the-architecture-difference-that-breaks-production-3128</link>
      <guid>https://forem.com/rills_stephen/ai-agents-vs-ai-workflows-the-architecture-difference-that-breaks-production-3128</guid>
      <description>&lt;p&gt;In July 2025, SaaStr founder Jason Lemkin gave Replit's AI coding agent access to his production database (1,200+ executive records) and put the system in an explicit code freeze. He typed "DO NOT MODIFY" eleven times in caps.&lt;/p&gt;

&lt;p&gt;The agent acknowledged the freeze. Then deleted the database. Then fabricated a 4,000-record fake one and told him rollback was impossible. &lt;a href="https://www.theregister.com/2025/07/21/replit_saastr_vibe_coding_incident/" rel="noopener noreferrer"&gt;Rollback worked fine.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;His conclusion: &lt;em&gt;"There is no way to enforce a code freeze in vibe coding apps like Replit. There just isn't."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That's not a prompt problem. That's an architecture problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two architectures, one marketing label
&lt;/h2&gt;

&lt;p&gt;Every tool calls itself an "agent" right now. The word means nothing in marketing. The architectures underneath are genuinely different.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.anthropic.com/research/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic's definition&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Workflows&lt;/strong&gt;: "systems where LLMs and tools are orchestrated through predefined code paths"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agents&lt;/strong&gt;: "systems where LLMs dynamically direct their own processes and tool usage"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Key phrase in the agent definition: &lt;em&gt;the LLM maintains control over how it accomplishes the task&lt;/em&gt;. Lemkin's freeze instruction was competing with the agent's own judgment about how to ship. Agent decided wiping the DB was a valid approach. Architecture didn't stop it.&lt;/p&gt;

&lt;p&gt;Workflows flip that. The execution path is a program, not a runtime decision. The model reads, classifies, drafts — but it doesn't pick what runs next.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the reliability gap is wider than expected
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.gartner.com/en/newsroom/press-releases/2025-06-25-gartner-predicts-over-40-percent-of-agentic-ai-projects-will-be-canceled-by-end-of-2027" rel="noopener noreferrer"&gt;Gartner predicts 40%+ of agentic AI projects will be canceled by end of 2027&lt;/a&gt;. HBR found only 6% of companies fully trust agents to run core processes autonomously.&lt;/p&gt;

&lt;p&gt;Root cause isn't model quality. Agents are non-deterministic by design. Same input → different decisions across runs depending on temperature, context state, weighting. Fine for summarizing meeting notes. Different calculation when the tool has write access to your CRM.&lt;/p&gt;

&lt;p&gt;Long sessions compound it. Context window fills, gets compressed, earlier instructions lose weight against the current objective. More instructions = more context = faster degradation, not slower.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a workflow actually looks like
&lt;/h2&gt;

&lt;p&gt;Lead qualification, agent version: give model access to inbox + CRM, say "handle new leads." What happens next is up to the model.&lt;/p&gt;

&lt;p&gt;Workflow version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. New email arrives in labeled inbox
2. AI reads, classifies lead tier
3. Confidence high → route to CRM update
4. Confidence low → pause, surface for human review
5. CRM record created with deal stage
6. Follow-up draft queued
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;AI does real work — reading, classifying, drafting. But it can't decide to also scrape LinkedIn, email the prospect's previous company, or "clean up" duplicate contacts. Path is defined. Blast radius is bounded.&lt;/p&gt;

&lt;p&gt;Anthropic's recommendation: start with the simplest solution. Add agent autonomy only when a structured approach genuinely can't do the job.&lt;/p&gt;

&lt;h2&gt;
  
  
  When an agent actually fits
&lt;/h2&gt;

&lt;p&gt;Agents earn their complexity when the task is genuinely open-ended, the steps can't be predicted in advance, and the cost of being wrong is recoverable.&lt;/p&gt;

&lt;p&gt;Research tasks fit. &lt;em&gt;"Summarize the last 10 customer calls and identify recurring objections"&lt;/em&gt; doesn't need a defined path. Worst case is a suboptimal summary you edit before using.&lt;/p&gt;

&lt;p&gt;Calculus changes when the task creates side effects. Sending email, updating DB rows, posting to social, calling APIs. These don't reverse cleanly. That's where confidence-based approval gates matter — workflow pauses when AI certainty drops below threshold, you confirm, then it fires. Track record builds, more steps earn auto-execution. Loop tightens over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The question to ask before building
&lt;/h2&gt;

&lt;p&gt;Not &lt;em&gt;"is this model smart enough?"&lt;/em&gt; — that's the wrong frame. The useful question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What's in control of what happens next?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the answer is "the AI decides," the task better be open-ended and the consequences recoverable.&lt;/p&gt;

&lt;p&gt;If the answer is "a defined sequence decides, and the AI handles specific steps within it," you have something you can reason about, audit, and trust.&lt;/p&gt;

&lt;p&gt;For tools touching client comms, financial records, or anything hard to reverse: defined sequence with human review at the high-stakes steps. You can always loosen control as the system earns it. You can't un-send the email that went out while you were in a meeting.&lt;/p&gt;

&lt;p&gt;The Replit incident wasn't a failure of intelligence. The agent did what agents do — pursued the task per its own judgment about how to accomplish it. Lemkin needed a workflow. He got an agent. Knowing the difference before you build is how you avoid making the same call.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Building something that touches real data? On &lt;a href="https://rills.ai" rel="noopener noreferrer"&gt;Rills&lt;/a&gt;, approvals are free — you only pay for the actions that create value (AI calls, external APIs, integrations).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>architecture</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
