
AI Agent Repeats Actions After a Kubernetes Pod Restart
An AI agent repeats actions after Kubernetes pod restart when completed steps live only in memory. Log each action to a durable ledger before running it.

Author profile
I ship software with AI every day and write about what that actually looks like the testing, the judgment calls, the parts that don't make it into the highlight reels.
Browse the latest writing surfaced through DevArt.

An AI agent repeats actions after Kubernetes pod restart when completed steps live only in memory. Log each action to a durable ledger before running it.

A kill switch fails when a cached flag, a skipped caller or a silent detector lets an AI agent keep running. Stop it with a hard process exit, not a flag.

To quarantine an AI agent after repeated guardrail blocks, count blocks in a window, hard-exit the process, and write a sentinel only a human can clear.

Pydantic and Zod both silently drop unknown keys by default. How to close every schema and count rejections when validating LLM tool call arguments.

To detect AI agent actions outside task scope, check each tool call against a declared task contract before it runs, and block anything unnamed.

Multi-turn jailbreak AI agent defense means enforcing tool permissions in code on every call. Refusals and per-message filters miss attacks spread across turns.

Detect unauthorized AI agents using company API keys by logging a caller ID on every call and reconciling provider usage with approvals, not key spend.

Support bots can be talked into refunds when the limit lives in the prompt. Air Canada, Chevrolet and the benchmark data show why caps belong in tool code.

A break-glass grant for an AI agent is a human-approved, time-boxed elevation that expires on its own. My own bot

If your team only celebrates on release, the ritual stops exactly when morale drops. Here's the research, plus a GitHub Action that runs it every Friday anyway.

Policy as code for AI agent tool authorization: why OPA or Cedar should decide every tool call, not the prompt. Real incidents, one hard lesson.

Adding an enum value is a breaking change for any API client or agent tool with a closed switch. Why spec diffs call it safe, and how to catch it.

Constrained decoding fixes JSON syntax, not silent failure. Why validate-and-retry loops for LLM structured output still lose work, and how to stop it.

Durable execution for AI agents: when Temporal earns its keep, when a plain state store is enough, and why resuming can be the dangerous part.

In Lost in the Middle, GPT-3.5 did worse with 20 docs than with none when the answer sat mid-prompt. Measure your dead zone, reorder chunks, gate tokens.

Recursion depth limits cap how many subagents exist, not what they spend. How LangGraph, OpenAI and Claude Code limit spawning, plus a budget gate.

A2A protocol authentication security goes past signed Agent Cards. A valid signature proves who signed the card, not whether you should trust it.

I'm building an open source (MIT) tool that watches the live responses of APIs you don't own and...

MCP tool poisoning hides instructions in a tool description, and rug pulls change them after you approve. Why one-time approval fails, with real cases.

Feature flags for AI agents: how to disable one tool in production without a redeploy, and why the flag itself can hide the failure.

Budget alerts report the overrun after the money is gone. Here's a pre-flight, atomic budget cap for OpenAI and Anthropic clients that you can copy and paste.

Each of your 20 agents checked the budget and passed, and together they still overspent. Here's a thread-safe pre-flight cap in Python, plus what alerts miss.

Compensating transactions can

Running multiple AI coding agents in the same repository breaks in ways git never reports. Shared ports, databases and lockfiles, and how to guard them.

LLM-as-a-judge reliability depends on more than an 80% agreement score. Here

API breaking changes detection fails for AI agents because the break returns 200 OK. Why versioning and contract tests miss it, and what catches it.

Least privilege for AI agents in practice: how to scope tools, credentials and filesystems, with the Replit and Amazon Q incidents as evidence.

hatswap keeps every Claude Code account signed in, moves a live conversation to another account, pins folders to clients, and hands work to Codex with a brief.

My bot logged LOCKOUT DETECTED and then ran for 3.5 more days. Here's a Python circuit breaker that caps rate, runtime and spend, then exits the process.

Google Flu Trends ran hot in 100 of 108 weeks. Your cost-anomaly alert has the same bug. Here's the Bayes math, and a pre-flight fix in Python.
Advertisement