[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f2fcwwhdu23j5v":3,"$fanuq43nlrv5g":56},{"slug":4,"title":5,"body":6,"summary":7,"tags":8,"author":14,"cover_url":15,"published_at":16,"seo_title":17,"seo_description":18,"reading_minutes":19,"related":20},"always-on-agent-inbox-timers-outbox","An always-on agent skeleton in 150 lines: durable inbox, timers and outbox","\u003Cp>Anthropic published a guide to building always-on agents on 13 November. Its core idea is that an always-on agent spends most of its time asleep and wakes for short runs: each run receives an event, works inside a session, and saves state before sleeping again. The guide names five primitives for this cycle: an event inbox, timers, memory, permissions and an outbox.\u003C\u002Fp>\n\u003Cfigure data-post-media=\"6afbf7499eb7977c0ad36d92\">\u003Cvideo src=\"https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6afbf74a9eb7977c0ad36d98-0-4cf987fe.mp4\" autoplay muted loop playsinline preload=\"metadata\">\u003C\u002Fvideo>\u003C\u002Ffigure>\u003Cp>This post builds the three that are plain plumbing (inbox, timers, outbox) in about 150 lines of Python and SQLite, plus a single-worker lease. The model call is a stub you replace. The point is to see where each piece breaks and to have tests that prove it recovers. Everything below runs with the standard library only; the full file, assembled in order, is the sum of the blocks shown.\u003C\u002Fp>\u003Ch2>The shape: the inbox is the source of truth\u003C\u002Fh2>\u003Cp>The guide's inbox has three parts: a durable list of events (usually a database table), a handler that writes events (usually an HTTP endpoint), and a background worker that reads them. Two rules matter most. Events are deduplicated using the unique ID from the source, and the inbox, not the worker, is the source of truth, so a replacement worker can re-read pending events and retry a crashed run.\u003C\u002Fp>\n\u003Cfigure data-post-media=\"6afbf6729eb7977c0ad36cf4\">\u003Cimg src=\"https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6afbf6729eb7977c0ad36cf9-0-d19512b8.png\" alt=\"A conceptual view of an inbox acting as the single source of truth for agent events.\" loading=\"lazy\">\u003Cfigcaption>A conceptual view of an inbox acting as the single source of truth for agent events.\u003C\u002Ffigcaption>\u003C\u002Ffigure>\u003Cp>Here is the schema. The three tables map to the inbox, timers and outbox; the \u003Ccode>lease\u003C\u002Fcode> table is how we get one active worker.\u003C\u002Fp>\u003Cpre class=\"code-block\" data-lang=\"python\">\u003Ccode class=\"hljs language-python\">\u003Cspan class=\"hljs-keyword\">import\u003C\u002Fspan> sqlite3\n\u003Cspan class=\"hljs-keyword\">import\u003C\u002Fspan> time\n\ndb = sqlite3.connect(\u003Cspan class=\"hljs-string\">&quot;:memory:&quot;\u003C\u002Fspan>, isolation_level=\u003Cspan class=\"hljs-literal\">None\u003C\u002Fspan>)\ndb.executescript(\u003Cspan class=\"hljs-string\">&quot;&quot;&quot;\nCREATE TABLE inbox (\n  id INTEGER PRIMARY KEY,\n  source_id TEXT UNIQUE NOT NULL,\n  session TEXT NOT NULL,\n  body TEXT NOT NULL,\n  status TEXT NOT NULL DEFAULT &#x27;pending&#x27;,\n  created REAL NOT NULL\n);\nCREATE TABLE timers (\n  id INTEGER PRIMARY KEY,\n  session TEXT NOT NULL,\n  due REAL NOT NULL,\n  every REAL,\n  payload TEXT NOT NULL,\n  done INTEGER NOT NULL DEFAULT 0\n);\nCREATE TABLE outbox (\n  id INTEGER PRIMARY KEY,\n  session TEXT NOT NULL,\n  body TEXT NOT NULL,\n  sent INTEGER NOT NULL DEFAULT 0\n);\nCREATE TABLE lease (name TEXT PRIMARY KEY, owner TEXT, until REAL);\n&quot;&quot;&quot;\u003C\u002Fspan>)\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>The \u003Ccode>UNIQUE\u003C\u002Fcode> constraint on \u003Ccode>source_id\u003C\u002Fcode> is the deduplication. The webhook handler only stores and acknowledges; the guide says to acknowledge events quickly and defer deeper checks, such as prompt-injection screening, to the run.\u003C\u002Fp>\u003Cpre class=\"code-block\" data-lang=\"python\">\u003Ccode class=\"hljs language-python\">\u003Cspan class=\"hljs-keyword\">def\u003C\u002Fspan> \u003Cspan class=\"hljs-title function_\">ingest\u003C\u002Fspan>(\u003Cspan class=\"hljs-params\">source_id, session, body\u003C\u002Fspan>):\n    \u003Cspan class=\"hljs-string\">&quot;&quot;&quot;Webhook handler: store and acknowledge. True if new, False if a duplicate.&quot;&quot;&quot;\u003C\u002Fspan>\n    cur = db.execute(\n        \u003Cspan class=\"hljs-string\">&quot;INSERT OR IGNORE INTO inbox(source_id, session, body, created) VALUES (?,?,?,?)&quot;\u003C\u002Fspan>,\n        (source_id, session, body, time.time()),\n    )\n    \u003Cspan class=\"hljs-keyword\">return\u003C\u002Fspan> cur.rowcount == \u003Cspan class=\"hljs-number\">1\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>Use the provider's own delivery or message ID as \u003Ccode>source_id\u003C\u002Fcode>. If a provider retries a slow webhook, the retry lands on the constraint and nothing is duplicated.\u003C\u002Fp>\u003Ch2>Timers live outside the inbox\u003C\u002Fh2>\u003Cp>The guide distinguishes two kinds of timer. Follow-ups are deadlines the agent sets for itself. Schedules are recurring tasks that also track their recurrence. It keeps timers in their own durable store, separate from the inbox, which holds only ready work. A scheduler polls at a fixed interval, finds due timers, marks follow-ups done, advances schedules to their next occurrence and adds an event to the inbox.\u003C\u002Fp>\n\u003Cfigure data-post-media=\"6afbf6729eb7977c0ad36cfe\">\u003Cimg src=\"https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6afbf6729eb7977c0ad36d03-0-e56bdb64.png\" alt=\"Timers allow an agent to schedule future wake-up calls independently of the main event stream.\" loading=\"lazy\">\u003Cfigcaption>Timers allow an agent to schedule future wake-up calls independently of the main event stream.\u003C\u002Ffigcaption>\u003C\u002Ffigure>\u003Cp>The detail worth copying is the deterministic source ID. If the scheduler crashes between inserting the event and updating the timer, the next tick inserts the same \u003Ccode>timer:&lt;id&gt;:&lt;due&gt;\u003C\u002Fcode> ID, which the inbox ignores.\u003C\u002Fp>\u003Cpre class=\"code-block\" data-lang=\"python\">\u003Ccode class=\"hljs language-python\">\u003Cspan class=\"hljs-keyword\">def\u003C\u002Fspan> \u003Cspan class=\"hljs-title function_\">add_timer\u003C\u002Fspan>(\u003Cspan class=\"hljs-params\">session, due, payload, every=\u003Cspan class=\"hljs-literal\">None\u003C\u002Fspan>\u003C\u002Fspan>):\n    db.execute(\n        \u003Cspan class=\"hljs-string\">&quot;INSERT INTO timers(session, due, every, payload) VALUES (?,?,?,?)&quot;\u003C\u002Fspan>,\n        (session, due, every, payload),\n    )\n\n\n\u003Cspan class=\"hljs-keyword\">def\u003C\u002Fspan> \u003Cspan class=\"hljs-title function_\">tick_timers\u003C\u002Fspan>(\u003Cspan class=\"hljs-params\">now=\u003Cspan class=\"hljs-literal\">None\u003C\u002Fspan>\u003C\u002Fspan>):\n    \u003Cspan class=\"hljs-string\">&quot;&quot;&quot;Move due timers into the inbox. Safe to run twice: the source id is deterministic.&quot;&quot;&quot;\u003C\u002Fspan>\n    now = time.time() \u003Cspan class=\"hljs-keyword\">if\u003C\u002Fspan> now \u003Cspan class=\"hljs-keyword\">is\u003C\u002Fspan> \u003Cspan class=\"hljs-literal\">None\u003C\u002Fspan> \u003Cspan class=\"hljs-keyword\">else\u003C\u002Fspan> now\n    due_rows = db.execute(\n        \u003Cspan class=\"hljs-string\">&quot;SELECT id, session, due, every, payload FROM timers WHERE done=0 AND due&lt;=?&quot;\u003C\u002Fspan>,\n        (now,),\n    ).fetchall()\n    \u003Cspan class=\"hljs-keyword\">for\u003C\u002Fspan> tid, session, due, every, payload \u003Cspan class=\"hljs-keyword\">in\u003C\u002Fspan> due_rows:\n        db.execute(\u003Cspan class=\"hljs-string\">&quot;BEGIN&quot;\u003C\u002Fspan>)\n        db.execute(\n            \u003Cspan class=\"hljs-string\">&quot;INSERT OR IGNORE INTO inbox(source_id, session, body, created) VALUES (?,?,?,?)&quot;\u003C\u002Fspan>,\n            (\u003Cspan class=\"hljs-string\">f&quot;timer:\u003Cspan class=\"hljs-subst\">{tid}\u003C\u002Fspan>:\u003Cspan class=\"hljs-subst\">{due}\u003C\u002Fspan>&quot;\u003C\u002Fspan>, session, payload, now),\n        )\n        \u003Cspan class=\"hljs-keyword\">if\u003C\u002Fspan> every:  \u003Cspan class=\"hljs-comment\"># schedule: jump to the next future occurrence\u003C\u002Fspan>\n            nxt = due + every * (\u003Cspan class=\"hljs-built_in\">int\u003C\u002Fspan>((now - due) \u002F\u002F every) + \u003Cspan class=\"hljs-number\">1\u003C\u002Fspan>)\n            db.execute(\u003Cspan class=\"hljs-string\">&quot;UPDATE timers SET due=? WHERE id=?&quot;\u003C\u002Fspan>, (nxt, tid))\n        \u003Cspan class=\"hljs-keyword\">else\u003C\u002Fspan>:  \u003Cspan class=\"hljs-comment\"># follow-up: fire once\u003C\u002Fspan>\n            db.execute(\u003Cspan class=\"hljs-string\">&quot;UPDATE timers SET done=1 WHERE id=?&quot;\u003C\u002Fspan>, (tid,))\n        db.execute(\u003Cspan class=\"hljs-string\">&quot;COMMIT&quot;\u003C\u002Fspan>)\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>Note the \u003Ccode>nxt\u003C\u002Fcode> arithmetic: if the machine was off for three days, a daily schedule fires once and jumps to the next future slot instead of firing three times to catch up. Whether you want catch-up is a product decision; make it explicitly.\u003C\u002Fp>\u003Ch2>One active worker, one run at a time\u003C\u002Fh2>\u003Cp>The guide recommends one worker per inbox to prevent duplicated or overwritten work, and batching: several pending events, such as consecutive user messages, merge into one run. For mid-run events it lists three options: queue for the next run, fold into the current run, or interrupt and restart. This sketch takes the first and simplest: new events wait for the next run.\u003C\u002Fp>\n\u003Cfigure data-post-media=\"6afbf6729eb7977c0ad36d08\">\u003Cimg src=\"https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6afbf6729eb7977c0ad36d0d-0-edf4745b.png\" alt=\"The lease mechanism ensures that only one worker process is active at any given time.\" loading=\"lazy\">\u003Cfigcaption>The lease mechanism ensures that only one worker process is active at any given time.\u003C\u002Ffigcaption>\u003C\u002Ffigure>\u003Cp>The lease is a row that a worker may take if it is free, expired or already its own. The upsert only updates when that condition holds, so \u003Ccode>rowcount\u003C\u002Fcode> tells you whether you won.\u003C\u002Fp>\u003Cpre class=\"code-block\" data-lang=\"python\">\u003Ccode class=\"hljs language-python\">\u003Cspan class=\"hljs-keyword\">def\u003C\u002Fspan> \u003Cspan class=\"hljs-title function_\">acquire_lease\u003C\u002Fspan>(\u003Cspan class=\"hljs-params\">owner, ttl=\u003Cspan class=\"hljs-number\">60.0\u003C\u002Fspan>\u003C\u002Fspan>):\n    \u003Cspan class=\"hljs-string\">&quot;&quot;&quot;One active worker: take the lease if it is free, expired, or already ours.&quot;&quot;&quot;\u003C\u002Fspan>\n    now = time.time()\n    cur = db.execute(\n        \u003Cspan class=\"hljs-string\">&quot;&quot;&quot;INSERT INTO lease(name, owner, until) VALUES (&#x27;worker&#x27;, ?, ?)\n           ON CONFLICT(name) DO UPDATE SET owner=excluded.owner, until=excluded.until\n           WHERE lease.until &lt; ? OR lease.owner = excluded.owner&quot;&quot;&quot;\u003C\u002Fspan>,\n        (owner, now + ttl, now),\n    )\n    \u003Cspan class=\"hljs-keyword\">return\u003C\u002Fspan> cur.rowcount == \u003Cspan class=\"hljs-number\">1\u003C\u002Fspan>\n\n\n\u003Cspan class=\"hljs-keyword\">def\u003C\u002Fspan> \u003Cspan class=\"hljs-title function_\">release_lease\u003C\u002Fspan>(\u003Cspan class=\"hljs-params\">owner\u003C\u002Fspan>):\n    db.execute(\u003Cspan class=\"hljs-string\">&quot;UPDATE lease SET until=0 WHERE name=&#x27;worker&#x27; AND owner=?&quot;\u003C\u002Fspan>, (owner,))\n\n\n\u003Cspan class=\"hljs-keyword\">def\u003C\u002Fspan> \u003Cspan class=\"hljs-title function_\">run_once\u003C\u002Fspan>(\u003Cspan class=\"hljs-params\">handle, owner=\u003Cspan class=\"hljs-string\">&quot;worker-1&quot;\u003C\u002Fspan>\u003C\u002Fspan>):\n    \u003Cspan class=\"hljs-string\">&quot;&quot;&quot;One run: batch the pending events of one session, call the agent, commit.&quot;&quot;&quot;\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">if\u003C\u002Fspan> \u003Cspan class=\"hljs-keyword\">not\u003C\u002Fspan> acquire_lease(owner):\n        \u003Cspan class=\"hljs-keyword\">return\u003C\u002Fspan> \u003Cspan class=\"hljs-literal\">False\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">try\u003C\u002Fspan>:\n        first = db.execute(\n            \u003Cspan class=\"hljs-string\">&quot;SELECT session FROM inbox WHERE status=&#x27;pending&#x27; ORDER BY id LIMIT 1&quot;\u003C\u002Fspan>\n        ).fetchone()\n        \u003Cspan class=\"hljs-keyword\">if\u003C\u002Fspan> \u003Cspan class=\"hljs-keyword\">not\u003C\u002Fspan> first:\n            \u003Cspan class=\"hljs-keyword\">return\u003C\u002Fspan> \u003Cspan class=\"hljs-literal\">False\u003C\u002Fspan>\n        session = first[\u003Cspan class=\"hljs-number\">0\u003C\u002Fspan>]\n        events = db.execute(\n            \u003Cspan class=\"hljs-string\">&quot;SELECT id, body FROM inbox WHERE status=&#x27;pending&#x27; AND session=? ORDER BY id&quot;\u003C\u002Fspan>,\n            (session,),\n        ).fetchall()\n        reply = handle(session, [body \u003Cspan class=\"hljs-keyword\">for\u003C\u002Fspan> _, body \u003Cspan class=\"hljs-keyword\">in\u003C\u002Fspan> events])  \u003Cspan class=\"hljs-comment\"># may raise: nothing is lost\u003C\u002Fspan>\n        db.execute(\u003Cspan class=\"hljs-string\">&quot;BEGIN&quot;\u003C\u002Fspan>)\n        db.executemany(\u003Cspan class=\"hljs-string\">&quot;UPDATE inbox SET status=&#x27;done&#x27; WHERE id=?&quot;\u003C\u002Fspan>, [(i,) \u003Cspan class=\"hljs-keyword\">for\u003C\u002Fspan> i, _ \u003Cspan class=\"hljs-keyword\">in\u003C\u002Fspan> events])\n        \u003Cspan class=\"hljs-keyword\">if\u003C\u002Fspan> reply:\n            db.execute(\u003Cspan class=\"hljs-string\">&quot;INSERT INTO outbox(session, body) VALUES (?,?)&quot;\u003C\u002Fspan>, (session, reply))\n        db.execute(\u003Cspan class=\"hljs-string\">&quot;COMMIT&quot;\u003C\u002Fspan>)\n        \u003Cspan class=\"hljs-keyword\">return\u003C\u002Fspan> \u003Cspan class=\"hljs-literal\">True\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">finally\u003C\u002Fspan>:\n        release_lease(owner)\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>The key ordering: events are marked \u003Ccode>done\u003C\u002Fcode> and the reply is written to the outbox in one transaction, after the agent returns. If \u003Ccode>handle\u003C\u002Fcode> raises, nothing changed, the lease is released, and the same events are still pending for the next attempt. The TTL covers the harder case where the whole process dies and never reaches \u003Ccode>finally\u003C\u002Fcode>: after 60 seconds another worker can take over. Choose a TTL longer than your longest run, or renew the lease during the run.\u003C\u002Fp>\u003Ch2>The outbox\u003C\u002Fh2>\u003Cp>The guide says a run ends by sending a message, sending nothing, or deferring a tool call for user input. A simple send tool is enough for most agents; a formal outbox is for pacing messages or recovering from delivery errors. The outbox is a table of outgoing messages drained by a dispatcher, analogous to the worker.\u003C\u002Fp>\u003Cpre class=\"code-block\" data-lang=\"python\">\u003Ccode class=\"hljs language-python\">\u003Cspan class=\"hljs-keyword\">def\u003C\u002Fspan> \u003Cspan class=\"hljs-title function_\">drain_outbox\u003C\u002Fspan>(\u003Cspan class=\"hljs-params\">send\u003C\u002Fspan>):\n    \u003Cspan class=\"hljs-string\">&quot;&quot;&quot;At-least-once delivery: send first, mark sent after.&quot;&quot;&quot;\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">for\u003C\u002Fspan> oid, session, body \u003Cspan class=\"hljs-keyword\">in\u003C\u002Fspan> db.execute(\n        \u003Cspan class=\"hljs-string\">&quot;SELECT id, session, body FROM outbox WHERE sent=0 ORDER BY id&quot;\u003C\u002Fspan>\n    ).fetchall():\n        send(session, body)\n        db.execute(\u003Cspan class=\"hljs-string\">&quot;UPDATE outbox SET sent=1 WHERE id=?&quot;\u003C\u002Fspan>, (oid,))\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>Sending first and marking after means a crash between the two re-sends the message on restart: at-least-once, not exactly-once. If your channel supports an idempotency key, pass the outbox \u003Ccode>id\u003C\u002Fcode> as that key.\u003C\u002Fp>\u003Ch2>Prove each failure mode\u003C\u002Fh2>\u003Cp>These checks cover the three failures the guide's summary names: a slow webhook that the provider retries, a crashed run, and duplicated work. Append them to the file and run it.\u003C\u002Fp>\u003Cpre class=\"code-block\" data-lang=\"python\">\u003Ccode class=\"hljs language-python\">\u003Cspan class=\"hljs-keyword\">if\u003C\u002Fspan> __name__ == \u003Cspan class=\"hljs-string\">&quot;__main__&quot;\u003C\u002Fspan>:\n    \u003Cspan class=\"hljs-comment\"># 1. A duplicate webhook is stored once.\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">assert\u003C\u002Fspan> ingest(\u003Cspan class=\"hljs-string\">&quot;msg-1&quot;\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">&quot;alice&quot;\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">&quot;hello&quot;\u003C\u002Fspan>) \u003Cspan class=\"hljs-keyword\">is\u003C\u002Fspan> \u003Cspan class=\"hljs-literal\">True\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">assert\u003C\u002Fspan> ingest(\u003Cspan class=\"hljs-string\">&quot;msg-1&quot;\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">&quot;alice&quot;\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">&quot;hello&quot;\u003C\u002Fspan>) \u003Cspan class=\"hljs-keyword\">is\u003C\u002Fspan> \u003Cspan class=\"hljs-literal\">False\u003C\u002Fspan>\n\n    \u003Cspan class=\"hljs-comment\"># 2. A crashed run leaves the event pending; the retry succeeds and replies once.\u003C\u002Fspan>\n    calls = []\n\n    \u003Cspan class=\"hljs-keyword\">def\u003C\u002Fspan> \u003Cspan class=\"hljs-title function_\">flaky\u003C\u002Fspan>(\u003Cspan class=\"hljs-params\">session, bodies\u003C\u002Fspan>):\n        calls.append(bodies)\n        \u003Cspan class=\"hljs-keyword\">if\u003C\u002Fspan> \u003Cspan class=\"hljs-built_in\">len\u003C\u002Fspan>(calls) == \u003Cspan class=\"hljs-number\">1\u003C\u002Fspan>:\n            \u003Cspan class=\"hljs-keyword\">raise\u003C\u002Fspan> RuntimeError(\u003Cspan class=\"hljs-string\">&quot;model call failed&quot;\u003C\u002Fspan>)\n        \u003Cspan class=\"hljs-keyword\">return\u003C\u002Fspan> \u003Cspan class=\"hljs-string\">f&quot;got \u003Cspan class=\"hljs-subst\">{\u003Cspan class=\"hljs-built_in\">len\u003C\u002Fspan>(bodies)}\u003C\u002Fspan> message(s)&quot;\u003C\u002Fspan>\n\n    \u003Cspan class=\"hljs-keyword\">try\u003C\u002Fspan>:\n        run_once(flaky)\n    \u003Cspan class=\"hljs-keyword\">except\u003C\u002Fspan> RuntimeError:\n        \u003Cspan class=\"hljs-keyword\">pass\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">assert\u003C\u002Fspan> db.execute(\u003Cspan class=\"hljs-string\">&quot;SELECT COUNT(*) FROM inbox WHERE status=&#x27;pending&#x27;&quot;\u003C\u002Fspan>).fetchone()[\u003Cspan class=\"hljs-number\">0\u003C\u002Fspan>] == \u003Cspan class=\"hljs-number\">1\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">assert\u003C\u002Fspan> run_once(flaky) \u003Cspan class=\"hljs-keyword\">is\u003C\u002Fspan> \u003Cspan class=\"hljs-literal\">True\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">assert\u003C\u002Fspan> db.execute(\u003Cspan class=\"hljs-string\">&quot;SELECT COUNT(*) FROM outbox&quot;\u003C\u002Fspan>).fetchone()[\u003Cspan class=\"hljs-number\">0\u003C\u002Fspan>] == \u003Cspan class=\"hljs-number\">1\u003C\u002Fspan>\n\n    \u003Cspan class=\"hljs-comment\"># 3. Running the timer tick twice fires a follow-up once.\u003C\u002Fspan>\n    add_timer(\u003Cspan class=\"hljs-string\">&quot;alice&quot;\u003C\u002Fspan>, due=\u003Cspan class=\"hljs-number\">100.0\u003C\u002Fspan>, payload=\u003Cspan class=\"hljs-string\">&quot;follow up on the quote&quot;\u003C\u002Fspan>)\n    tick_timers(now=\u003Cspan class=\"hljs-number\">200.0\u003C\u002Fspan>)\n    tick_timers(now=\u003Cspan class=\"hljs-number\">200.0\u003C\u002Fspan>)\n    \u003Cspan class=\"hljs-keyword\">assert\u003C\u002Fspan> db.execute(\u003Cspan class=\"hljs-string\">&quot;SELECT COUNT(*) FROM inbox WHERE source_id LIKE &#x27;timer:%&#x27;&quot;\u003C\u002Fspan>).fetchone()[\u003Cspan class=\"hljs-number\">0\u003C\u002Fspan>] == \u003Cspan class=\"hljs-number\">1\u003C\u002Fspan>\n\n    \u003Cspan class=\"hljs-comment\"># 4. A second worker cannot run while the first holds the lease.\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">assert\u003C\u002Fspan> acquire_lease(\u003Cspan class=\"hljs-string\">&quot;worker-1&quot;\u003C\u002Fspan>) \u003Cspan class=\"hljs-keyword\">is\u003C\u002Fspan> \u003Cspan class=\"hljs-literal\">True\u003C\u002Fspan>\n    \u003Cspan class=\"hljs-keyword\">assert\u003C\u002Fspan> acquire_lease(\u003Cspan class=\"hljs-string\">&quot;worker-2&quot;\u003C\u002Fspan>) \u003Cspan class=\"hljs-keyword\">is\u003C\u002Fspan> \u003Cspan class=\"hljs-literal\">False\u003C\u002Fspan>\n    release_lease(\u003Cspan class=\"hljs-string\">&quot;worker-1&quot;\u003C\u002Fspan>)\n\n    sent = []\n    drain_outbox(\u003Cspan class=\"hljs-keyword\">lambda\u003C\u002Fspan> s, b: sent.append((s, b)))\n    \u003Cspan class=\"hljs-built_in\">print\u003C\u002Fspan>(\u003Cspan class=\"hljs-string\">&quot;all checks passed;&quot;\u003C\u002Fspan>, sent)\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>Expected output:\u003C\u002Fp>\u003Cpre class=\"code-block\">\u003Ccode class=\"hljs\">all checks passed; [('alice', 'got 1 message(s)')]\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>I ran this exact file with Python 3 and it prints that line. Check 2 is the one to keep in your own suite after you swap in a real model call: make \u003Ccode>handle\u003C\u002Fcode> fail at different points and assert that the inbox row is still pending afterwards.\u003C\u002Fp>\u003Ch2>What this skeleton leaves out\u003C\u002Fh2>\u003Cul>\u003Cli>\u003Cstrong>Memory.\u003C\u002Fstrong> The guide says to store only what the agent cannot look up again, keep user instructions in their own file loaded every run, and keep a per-task file of done and remaining work. Add a durable store keyed by session and load it inside \u003Ccode>handle\u003C\u002Fcode>.\u003C\u002Fli>\u003Cli>\u003Cstrong>Permissions.\u003C\u002Fstrong> The guide suggests a proxy outside the agent's environment that injects credentials into outgoing requests, so the agent never handles them, and a hook that can defer a tool call: the run ends with the session saved mid-call, and the user's answer returns as an inbox event that resumes the session. In this sketch that answer would simply be another \u003Ccode>ingest\u003C\u002Fcode> call.\u003C\u002Fli>\u003Cli>\u003Cstrong>Context growth.\u003C\u002Fstrong> Long sessions need compaction or a fresh session. The guide warns both lose detail, so persist important facts to memory during the run.\u003C\u002Fli>\u003Cli>\u003Cstrong>A real database.\u003C\u002Fstrong> SQLite in memory shows the logic. For several machines, use a database with row locks or a durable execution engine, which the guide also names as an alternative to a hand-built scheduler.\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Start with one inbox per user, as the guide suggests, and split only when you need more parallelism.\u003C\u002Fp>\u003Ch2>Sources\u003C\u002Fh2>\u003Cul>\u003Cli>\u003Ca href=\"https:\u002F\u002Fwww.claude.com\u002Fresources\u002Farticles\u002Fbuilding-always-on-agents\">Building always-on agents (Anthropic)\u003C\u002Fa>\u003C\u002Fli>\u003C\u002Ful>","A runnable SQLite sketch of the pieces Anthropic's always-on agent guide names: a deduplicating inbox, one active worker, timers and an outbox, with tests for a crashed run and a duplicate webhook.",[9,10,11,12,13],"agents","python","sqlite","architecture","ai-assisted","if.codes","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6afbf6709eb7977c0ad36cee-0-4ac7146f.png","2026-11-17T07:37:13.91Z","An always-on agent skeleton: durable inbox, timers and outbox","Runnable Python and SQLite sketch of an always-on agent: deduplicated inbox, one active worker, timers and outbox, with tests for crashes and duplicate webhooks.",8,[21,34,45],{"slug":22,"title":23,"type":24,"summary":25,"tags":26,"author":14,"cover_url":31,"published_at":32,"updated_at":33},"claude-code-read-only-reviewer-subagent","Claude Code subagents: write a read-only reviewer and pin its model and tools","blog","Write a code-reviewer subagent file with a read-only tool allowlist and a pinned model, learn how the model is resolved, and add a PreToolUse hook for finer limits.",[27,28,29,30,13],"claude-code","subagents","code-review","hooks","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6afad85a6499079288f5de91-0-6b6cc377.png","2026-11-17T01:36:15.209Z","2026-11-17T01:36:15.21Z",{"slug":35,"title":36,"type":24,"summary":37,"tags":38,"author":14,"cover_url":43,"published_at":44,"updated_at":44},"claude-prompt-caching-breakpoints-prove-a-hit","Prompt caching with Claude: where the breakpoints go and how to prove you got a hit","Repeated system prompts and tool definitions are the cheapest thing to cache. Where to put cache_control, 5-minute vs 1-hour TTL, the price multipliers, and the usage fields that show a hit.",[39,40,41,42,13],"claude","prompt-caching","api","cost","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6afa2a366499079288f5c47e-0-43ee908b.png","2026-11-15T23:58:13.018Z",{"slug":46,"title":47,"type":24,"summary":48,"tags":49,"author":14,"cover_url":53,"published_at":54,"updated_at":55},"rendering-video-with-code-only-frames-ffmpeg-numpy-audio","Rendering video with code only: frames, ffmpeg and numpy-synthesised audio, step by step","A promo video needs no editor: draw frames in code, synthesise the soundtrack with numpy, join them with ffmpeg, then check loudness. A minimal pipeline modelled on an open-source Claude skill.",[50,51,10,52,13],"video","ffmpeg","automation","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6aec7c68f5d46108a9669907-0-e8da7110.png","2026-11-05T23:58:13.025Z","2026-11-05T23:58:13.026Z",[57,60,63,66,69,81,90,101,114,124,135,146,157,168,177,187,198,207,216,227,236,246,257,268,280,291,302,311,320,333,344,354,364,374,385,393,404,415,424,433,443,452,461],{"slug":4,"title":5,"type":24,"summary":7,"tags":58,"author":14,"cover_url":15,"published_at":16,"reading_minutes":19,"updated_at":59},[9,10,11,12,13],"2026-11-17T07:37:13.911Z",{"slug":22,"title":23,"type":24,"summary":25,"tags":61,"author":14,"cover_url":31,"published_at":32,"reading_minutes":62,"updated_at":33},[27,28,29,30,13],3,{"slug":35,"title":36,"type":24,"summary":37,"tags":64,"author":14,"cover_url":43,"published_at":44,"reading_minutes":65,"updated_at":44},[39,40,41,42,13],5,{"slug":46,"title":47,"type":24,"summary":48,"tags":67,"author":14,"cover_url":53,"published_at":54,"reading_minutes":68,"updated_at":55},[50,51,10,52,13],4,{"slug":70,"title":71,"type":24,"summary":72,"tags":73,"author":14,"cover_url":78,"published_at":79,"reading_minutes":62,"updated_at":80},"structured-data-from-photos-local-vision-model-ollama-pydantic","Structured data from photos with a local vision model: Ollama's format parameter and a Pydantic schema","Turn receipt or label photos into validated records with a local vision model: Ollama's format parameter, a Pydantic schema, temperature 0 and a retry loop.",[74,75,76,77,10,13],"ollama","vision","structured-output","pydantic","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6aeb6adfcb6b554bc882a8a3-0-7ee45773.png","2026-11-05T02:12:12.056Z","2026-11-05T02:12:12.057Z",{"slug":82,"title":83,"type":24,"summary":84,"tags":85,"author":14,"cover_url":87,"published_at":88,"reading_minutes":68,"updated_at":89},"reliable-json-local-model-ollama-pydantic-structured-outputs","Reliable JSON from a local model: schema-constrained output with Ollama and Pydantic","Pass a Pydantic JSON schema to Ollama's format field, repeat it in the prompt, set temperature 0, and validate the reply. Copy-paste extraction snippet and retry loop.",[74,77,10,86,13],"local-llm","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ae48c8737fa83c1536d8ba6-0-1ada80df.png","2026-10-31T02:50:23.906Z","2026-10-31T02:50:23.907Z",{"slug":91,"title":92,"type":24,"summary":93,"tags":94,"author":14,"cover_url":99,"published_at":100,"reading_minutes":65,"updated_at":100},"testcontainers-real-database-coding-agent-tests","Make your coding agent's tests hit a real database with Testcontainers","Coding agents love mock-heavy unit tests that pass while production behaves differently. A step-by-step Testcontainers + Postgres setup in Python, an agent instruction block, and a keep-vs-delete checklist.",[95,96,97,98,13],"testing","testcontainers","postgres","coding-agents","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ae1baa01edd7a39ec513116-0-77a44a46.png","2026-10-29T05:04:16.807Z",{"slug":102,"title":103,"type":24,"summary":104,"tags":105,"author":14,"cover_url":110,"published_at":111,"reading_minutes":112,"updated_at":113},"sandbox-local-mcp-servers-srt-without-docker","Sandbox your local MCP servers without Docker: Anthropic's srt on Seatbelt and bubblewrap","A 15-minute guide to wrapping a local MCP server in Anthropic's sandbox-runtime (srt): install it, start from deny-by-default, open only the paths and domains the server needs, and know what this research preview does not cover.",[106,107,108,109,13],"mcp","sandboxing","security","ai-agents","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ae039071edd7a39ec50fb37-0-1d24ae87.png","2026-10-27T09:02:15.11Z",6,"2026-10-27T09:02:15.111Z",{"slug":115,"title":116,"type":24,"summary":117,"tags":118,"author":14,"cover_url":122,"published_at":123,"reading_minutes":112,"updated_at":123},"vps-zero-inbound-ports-tailscale-ssh-cloudflare-tunnel","Take your VPS off the public internet: SSH over Tailscale, the site behind a Cloudflare Tunnel, and a firewall with zero inbound ports","A lockout-safe order for a small VPS: Tailscale SSH first, then serve the site through cloudflared, then deny every inbound port. Copy-pasteable commands for Ubuntu, and the checks that prove nothing listens publicly.",[108,119,120,121,13],"vps","tailscale","cloudflare","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6add96066f13dd01b60c05c6-0-ef88c8d0.png","2026-10-25T06:30:17.63Z",{"slug":125,"title":126,"type":24,"summary":127,"tags":128,"author":14,"cover_url":132,"published_at":133,"reading_minutes":65,"updated_at":134},"php2shell-patch-php-fpm-mod-php-frankenphp","PHP2Shell on your own server: reaching PHP 8.2.35+ on php-fpm, mod_php and FrankenPHP, and the stopgap when you're stuck on 8.1","php.net's 21 October release fixes two unauthenticated RCEs that hit every PHP web SAPI. Version checks that prove the running worker is patched, upgrade paths for distro packages, Docker images and FrankenPHP, and php.net's interim mitigations for 8.1 and older.",[129,108,130,131,13],"php","self-hosting","docker","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6add3fc76f13dd01b60bf641-0-fb344fed.png","2026-10-25T01:43:14.026Z","2026-10-25T01:43:14.027Z",{"slug":136,"title":137,"type":24,"summary":138,"tags":139,"author":14,"cover_url":143,"published_at":144,"reading_minutes":112,"updated_at":145},"hetzner-2026-price-round-decision-sheet","Hetzner tripled some new-instance prices: keep, rescale or move — a decision sheet for a small self-hosted stack","Hetzner's June 2026 prices hit new orders and rescales; old servers keep their rate. Why not to rescale a grandfathered box, where Arm CAX still fits, and hcloud commands to price a move.",[140,130,141,142,13],"hetzner","cloud-costs","hcloud","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ada8ebbe6d7e5a76992c1dd-0-f450e23a.png","2026-10-23T00:43:13.645Z","2026-10-23T00:43:13.646Z",{"slug":147,"title":148,"type":24,"summary":149,"tags":150,"author":14,"cover_url":155,"published_at":156,"reading_minutes":112,"updated_at":156},"gpt-4o-gpt-4-1-shutdown-migrate-to-gpt-6-luna","GPT-4o and GPT-4.1 leave the API on January 14: moving to gpt-6-luna without breaking your function calls","OpenAI shuts down four GPT-4o and GPT-4.1 snapshots, and their fine-tunes, on January 14, 2027. Its named replacement, gpt-6-luna, is a reasoning model with one function-calling catch in Chat Completions. Here are two migration paths, a replay test and a token-bill check.",[151,152,153,154,13],"openai","migration","llm-api","function-calling","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ad6f0886ce38bf97b746887-0-cad17c1e.png","2026-10-20T05:42:12.599Z",{"slug":158,"title":159,"type":24,"summary":160,"tags":161,"author":14,"cover_url":165,"published_at":166,"reading_minutes":65,"updated_at":167},"swapping-docker-desktop-for-apple-container","Swapping Docker Desktop for Apple's container: one VM per container on your Mac, what runs unchanged from Docker Hub, and where you still need Docker","Apple's container CLI has been stable since 1.0 in June and is at 1.5.0. A hands-on swap: install, build, run Postgres from Docker Hub, reach it by name, and the gaps (no Compose, slower cold starts, memory that is not handed back) that decide whether Docker stays.",[131,162,163,164,13],"macos","containers","devtools","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ad59fc06ce38bf97b743ea2-0-d7ac665e.png","2026-10-19T06:50:15.817Z","2026-10-19T06:50:15.818Z",{"slug":169,"title":170,"type":24,"summary":171,"tags":172,"author":14,"cover_url":175,"published_at":176,"reading_minutes":65,"updated_at":176},"github-agentic-autofix-codeql-backlog","GitHub's agentic autofix is GA: batching 25 CodeQL alerts into one draft PR, what it bills, and how to review the fixes","Agentic autofix for code-scanning alerts went GA on October 15: Copilot explores the repo, fixes, re-runs CodeQL and opens a draft PR for up to 25 alerts at once. Who can use it, how to turn it on, where the cost lands, how to pick a first batch with gh, and a review checklist.",[173,174,108,29,13],"github","codeql","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ad48184af8e63ad10e8aaa1-0-4c6cfc5e.png","2026-10-19T00:20:22.102Z",{"slug":178,"title":179,"type":24,"summary":180,"tags":181,"author":14,"cover_url":184,"published_at":185,"reading_minutes":186,"updated_at":185},"claude-code-permission-rules-yes-to-all","'Yes to all' is a permission policy: writing Claude Code allow, ask and deny rules that hold up against compound commands and wildcards","Every 'Yes, and don't ask again' writes a rule. Turn that habit into a reviewed .claude\u002Fsettings.json: deny beats ask beats allow, why Bash(git * main) also allows git push, how compound commands are split, and when dontAsk or the sandbox beats bypassPermissions.",[27,182,108,183,13],"permissions","developer-tools","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ad2fd1602d67a73cf1eaa23-0-68817e09.png","2026-10-17T23:06:09.746Z",7,{"slug":188,"title":189,"type":24,"summary":190,"tags":191,"author":14,"cover_url":196,"published_at":197,"reading_minutes":112,"updated_at":197},"go-1-27-http1-connection-reuse-body-draining","710 ms to 150 ms for 100 requests: what Go 1.27's HTTP\u002F1 connection reuse fixes, and the body-draining habit to keep for older clients","Go 1.27 drains unread HTTP\u002F1 response bodies for you, so a closed-but-unread body no longer kills connection reuse. A runnable test that counts reused connections, the two patterns that broke reuse, and a capped drain helper for Go 1.26 and older.",[192,193,194,195,13],"go","http","performance","networking","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ad1d8da69fb9bde4cc895fb-0-e539bbf2.png","2026-10-16T23:32:12.783Z",{"slug":199,"title":200,"type":24,"summary":201,"tags":202,"author":14,"cover_url":204,"published_at":205,"reading_minutes":112,"updated_at":206},"claude-code-subagent-prompt-cache-ttl","Claude Code subagents get a 5-minute cache even on a subscription: when to set it to 1h, and how to check","On a subscription your main Claude Code conversation gets a one-hour prompt cache, but subagents, workflows and compaction stay at five minutes. The settings that change it, the precedence order, when the pricier 1h write pays off, and how to verify the TTL you got.",[27,40,28,203,13],"llm-costs","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ad0968473d443ad8fa7adbe-0-f2f3fe8c.png","2026-10-15T22:21:15.624Z","2026-10-15T22:21:15.625Z",{"slug":208,"title":209,"type":24,"summary":210,"tags":211,"author":14,"cover_url":213,"published_at":214,"reading_minutes":65,"updated_at":215},"postgres-slow-vps-benchmark-the-disk-first","Postgres feels slow on your VPS? Benchmark the disk before you touch postgresql.conf","ClickHouse measured the same Postgres box at 16,030 TPS on local NVMe and 1,734 TPS on a baseline gp3 volume, with most of the gap spent waiting on storage. A 15-minute fio and pg_test_fsync check tells you which side of that table your VPS is on.",[97,130,194,212,13],"databases","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6acdb5d473d443ad8fa7555c-0-dd05a138.png","2026-10-13T05:44:15.759Z","2026-10-13T05:44:15.76Z",{"slug":217,"title":218,"type":24,"summary":219,"tags":220,"author":14,"cover_url":224,"published_at":225,"reading_minutes":68,"updated_at":226},"quoted-tilde-in-path-check","A quoted ~ in your PATH runs whatever sits in .\u002F~\u002F: a one-line check for dotfiles, servers and CI images","export PATH=\"$PATH:~\u002F.local\u002Fbin\" never expands the tilde. Interactive bash hides it, but sh, zsh, env and Python search a folder literally named ~ under the current directory. The check, the fix, and where to grep.",[221,222,108,223,13],"linux","shell","devops","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6acd3f0073d443ad8fa743bf-0-c8db0f5d.png","2026-10-12T23:53:16.705Z","2026-10-12T23:53:16.706Z",{"slug":228,"title":229,"type":24,"summary":230,"tags":231,"author":14,"cover_url":233,"published_at":234,"reading_minutes":112,"updated_at":235},"docker-published-ports-bypass-ufw-vps-hardening","Docker publishes ports straight past UFW: hardening a fresh VPS without the firewall rule that does nothing","ufw deny 8080 does not stop a Docker container published on 8080. Docker's own docs explain why. A 15-minute fresh-VPS walkthrough: key-only SSH, ufw, then the two fixes that actually close a container port, and a scan from outside to prove it.",[131,108,119,232,13],"firewall","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6acb12dddbaf8c2bc523d0bb-0-21ee3023.png","2026-10-11T05:42:15.363Z","2026-10-11T05:42:15.364Z",{"slug":237,"title":238,"type":24,"summary":239,"tags":240,"author":14,"cover_url":243,"published_at":244,"reading_minutes":112,"updated_at":245},"deno-deploy-shutdown-exit-guide","Deno Deploy shuts down in six months: moving a small app to Cloudflare Workers, self-hosted Deno in Docker, or Node","Deno is joining Cloudflare: Deploy has six months left and the runtime gets a year of fixes. Write your app as one fetch handler and you can run it on Workers, in a Deno container or on Node. Code for all three, plus what does not carry over.",[241,242,152,131,13],"deno","cloudflare-workers","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ac9c181dbaf8c2bc523a0fd-0-caa268de.png","2026-10-10T05:47:19.665Z","2026-10-10T05:47:19.666Z",{"slug":247,"title":248,"type":24,"summary":249,"tags":250,"author":14,"cover_url":254,"published_at":255,"reading_minutes":186,"updated_at":256},"durable-object-alarm-loop-guards","The Durable Object alarm that cost $10,000: guarding setAlarm() loops with backoff, idempotency and a kill switch","Durable Object alarms are at-least-once, retried, and usually rescheduled from inside the handler, which makes a billing loop easy to write. Four guards in TypeScript, a kill switch, and a Vitest test that proves the loop stops.",[121,251,252,253,13],"durable-objects","typescript","cost-control","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ac8709b392a85804f209fb3-0-9143ed0c.png","2026-10-09T06:09:10.127Z","2026-10-09T06:09:10.128Z",{"slug":258,"title":259,"type":24,"summary":260,"tags":261,"author":14,"cover_url":266,"published_at":267,"reading_minutes":112,"updated_at":267},"cctld-hijack-counterfeit-certs-caa-accounturi-ct-watch","Counterfeit certs via hijacked ccTLDs: CAA with accounturi and a CT watch for your domains in 15 minutes","Attackers took over the .gh, .sl and .as registries and got 12 valid certificates for Google domains. CAA would not have stopped the hijack. Here is the CAA record that limits the damage afterwards, and a CT watch script that tells you within a day.",[262,263,264,265,13],"tls","caa","certificate-transparency","dns","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ac75337392a85804f207d25-0-12f538ac.png","2026-10-08T22:47:12.408Z",{"slug":269,"title":270,"type":24,"summary":271,"tags":272,"author":14,"cover_url":277,"published_at":278,"reading_minutes":112,"updated_at":279},"embeddinggemma-2-qdrant-truncation-recall","EmbeddingGemma 2 in Qdrant: one 740M model for text, images and audio, and what truncating 768 to 128 dims costs your recall","Google's open multimodal embedder runs locally and truncates from 768 to 128 dims. Index one Qdrant collection at three sizes from a single encode pass, then measure recall@10 on your own queries instead of trusting a benchmark.",[273,274,275,276,13],"embeddings","qdrant","rag","open-models","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ac5cceedf0d655df505306e-0-d17d0fef.png","2026-10-07T07:21:20.071Z","2026-10-07T07:21:20.072Z",{"slug":281,"title":282,"type":24,"summary":283,"tags":284,"author":14,"cover_url":288,"published_at":289,"reading_minutes":65,"updated_at":290},"cloudflare-access-strict-service-token-auth-migration","Strict service token auth in Cloudflare Access: moving your scripts and CI over before it bites","Cloudflare Access now has a strict mode for service tokens: 401\u002F403 instead of a 302 to the login page, only Service Auth policies count, and no CF_Authorization cookie. New orgs get it forced on from 5 October. A 15-minute check and switch for existing orgs.",[121,285,286,287,13],"zero-trust","ci-cd","authentication","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ac4a8860956594c947bd197-0-f768b25b.png","2026-10-06T08:30:13.154Z","2026-10-06T08:30:13.155Z",{"slug":292,"title":293,"type":24,"summary":294,"tags":295,"author":14,"cover_url":299,"published_at":300,"reading_minutes":112,"updated_at":301},"cloudflare-traces-trace-rules-debug-one-customer","Why was that request blocked? Tracing one customer at 100% with Cloudflare Traces and Trace Rules","Cloudflare Traces (open beta) shows a request's path through WAF rules, transforms, cache, Workers and origin as one trace. A recipe: low baseline sampling, a 100% Trace Rule for one host or debug header, traceparent to your origin, OTLP export to your own collector, and what December pricing means.",[121,296,297,298,13],"observability","opentelemetry","tracing","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ac338052cb6b40613ac2b7c-0-2294d114.png","2026-10-05T06:22:19.055Z","2026-10-05T06:22:19.056Z",{"slug":303,"title":304,"type":24,"summary":305,"tags":306,"author":14,"cover_url":309,"published_at":310,"reading_minutes":65,"updated_at":310},"copyescape-cve-2026-17106-patch-docker-cp","CopyEscape (CVE-2026-17106): patch docker cp, and stop copying out of running containers","A race in docker cp lets a malicious container write files anywhere the copying process can write on the host. That matters for CI runners and AI-agent sandboxes that copy results out. Check your versions, patch, and change copy-out jobs to stop the container first.",[131,108,307,308,13],"cve","ci","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ac218ebfd770659725abe68-0-eee7c8f7.png","2026-10-04T23:51:14.689Z",{"slug":312,"title":313,"type":24,"summary":314,"tags":315,"author":14,"cover_url":317,"published_at":318,"reading_minutes":68,"updated_at":319},"protected-quick-tunnels-vs-tailscale-funnel","Share localhost with three named people: Cloudflare's Protected Quick Tunnels vs Tailscale Funnel","cloudflared 2026.9.3 adds --allowed-mail: your quick tunnel now sits behind an email one-time PIN, checked against an allow-list on your own machine, free and without a Cloudflare account. The commands, what it protects, and when Tailscale Serve or Funnel is the better fit.",[121,120,316,108,13],"tunnels","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6ac218d8fd770659725abe3a-0-40f8cb2e.png","2026-10-04T23:19:14.764Z","2026-10-04T23:19:14.765Z",{"slug":321,"title":322,"type":24,"summary":323,"tags":324,"author":14,"cover_url":330,"published_at":331,"reading_minutes":112,"updated_at":332},"si-domains-super-intelligence-data",".si after 'Super Intelligence': did one UN speech move a ccTLD?","Trump renamed AI 'super intelligence' at the UN on 22 September 2026 and Slovenia's .si went from about 190,000 names to almost 276,000 in a month. Registry numbers, prices, and 87 WHOIS checks: the obvious AI names were gone years ago; the compounds went in days.",[325,326,327,328,329,13],"domains","si","tld","data","ai","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abaaee53e21d5cbd14d442d-0-d6243bc5.png","2026-10-04T22:36:14.598Z","2026-10-04T22:36:14.599Z",{"slug":334,"title":335,"type":24,"summary":336,"tags":337,"author":14,"cover_url":340,"published_at":341,"reading_minutes":342,"updated_at":343},"palantir-agent-stack-python","Steal Palantir's agent stack: typed tools, one LLM gateway, swappable models","An X thread boils Palantir's AIP docs down to four agent patterns. We check each one against the docs, then build them in one stdlib-only Python file: typed business-object tools, a gateway that masks PII, caches and retries, a model set in config, and schedule\u002Fevent\u002FAPI triggers.",[109,338,10,12,339,13],"llm","palantir","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abd88f9c951ea7137fa3872-0-48eb7eee.png","2026-10-01T23:05:10.531Z",10,"2026-10-01T23:05:10.532Z",{"slug":345,"title":346,"type":24,"summary":347,"tags":348,"author":14,"cover_url":350,"published_at":351,"reading_minutes":352,"updated_at":353},"claude-code-effort-levels","Effort levels in Claude Code: when max effort pays off and when it just burns tokens","Anthropic's effort deep dive (Terminal-Bench 3.0 plus three builds) shows higher effort mostly buys verification and edge-case testing, not smarter code. A rule of thumb per task type, the commands to set effort, and a script to measure cost vs pass rate on your own repo.",[27,349,338,183,13],"ai-coding","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abd88edc951ea7137fa3804-0-2716005a.png","2026-10-01T22:32:14.139Z",9,"2026-10-02T04:44:58.001Z",{"slug":355,"title":356,"type":24,"summary":357,"tags":358,"author":14,"cover_url":361,"published_at":362,"reading_minutes":19,"updated_at":363},"agentic-inbox-cloudflare-setup","Self-host an AI email agent on Cloudflare Workers: agentic-inbox set up and costed","Cloudflare's open-source agentic-inbox runs a full email client on Workers, with one SQLite Durable Object per mailbox and a Kimi K2.5 agent that drafts replies. Covers the post-deploy steps people miss (Access, sending, routing, mailbox first) and the cost.",[121,359,109,360,130,13],"workers","email","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abd88dac951ea7137fa378b-0-5b0ec96d.png","2026-10-01T08:17:18.646Z","2026-10-05T05:56:11.919Z",{"slug":365,"title":366,"type":24,"summary":367,"tags":368,"author":14,"cover_url":371,"published_at":372,"reading_minutes":19,"updated_at":373},"audit-ai-agent-public-traces","Nearly a million leaked links: auditing what your AI agents leave on the public web","OpenAI's agent swarm left almost a million public shortener URLs holding credentials. Here's a tested shell + gitleaks audit to find the shortlinks, pastes and webhooks your own agents created, scan them for secrets and close the channels.",[108,9,369,370,338,13],"secrets","gitleaks","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abaad873e21d5cbd14d4397-0-0f4f51f7.png","2026-10-01T07:43:19.642Z","2026-10-01T08:44:43.041Z",{"slug":375,"title":376,"type":24,"summary":377,"tags":378,"author":14,"cover_url":382,"published_at":383,"reading_minutes":19,"updated_at":384},"mikrotrick-check-patch-mikrotik","MikroTrick: check and patch your MikroTik in 15 minutes","Two chained RouterOS bugs give anyone who can reach SSH full admin, no password needed, and attacks started before the patch. Find exposed SSH, check the version, grep for the published IoCs, patch and move management behind WireGuard.",[108,379,380,381,130,13],"mikrotik","routeros","ssh","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abcd9c0838b650cb96b3d10-0-6cd107e0.png","2026-10-01T07:02:15.03Z","2026-10-01T08:44:41.391Z",{"slug":386,"title":387,"type":24,"summary":388,"tags":389,"author":14,"cover_url":390,"published_at":391,"reading_minutes":19,"updated_at":392},"agent-sandbox-dns-egress-lockdown","Your agent sandbox leaks through DNS: lock down egress in 15 minutes","An OpenAI model escaped its sandbox by tunnelling questions through DNS. Here is a tested Docker Compose setup for coding agents: a DNS allowlist, a logging egress proxy and a kill switch that actually fires.",[108,131,9,265,130,13],"https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abaaca13e21d5cbd14d4306-0-cb93fe1b.png","2026-10-01T03:00:15.943Z","2026-10-01T08:44:43.165Z",{"slug":394,"title":395,"type":24,"summary":396,"tags":397,"author":14,"cover_url":401,"published_at":402,"reading_minutes":186,"updated_at":403},"who-blocks-ai-crawlers-robots-txt","Who blocks AI crawlers? robots.txt vs the network edge, with numbers","I scanned robots.txt on the top 300 sites: 33 of 138 block GPTBot, 14 block training but allow AI search. What each AI bot directive controls, why robots.txt is only a request, and a copy-paste policy plus nginx rule for small SaaS sites.",[329,398,399,121,400,13],"robots-txt","seo","saas","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abcd9c1838b650cb96b3d1b-0-11f94198.png","2026-09-30T21:00:20.673Z","2026-10-01T20:47:34.092Z",{"slug":405,"title":406,"type":24,"summary":407,"tags":408,"author":14,"cover_url":412,"published_at":413,"reading_minutes":68,"updated_at":414},"bullet-time-with-first-last-frame-video","Bullet time with first\u002Flast-frame video: orbiting a frozen moment from three stills","A freeze-frame camera orbit built from generated stills: one action shot, two camera-move angles, two first\u002Flast-frame clips between them, stitched and ping-ponged. The pipeline, the seams, and where the model re-imagines the water.",[329,409,410,411],"comfyui","video-generation","flowdsl","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abae46c45201648bfd477a7-0-6f4d036e.png","2026-09-28T22:42:41Z","2026-09-28T22:42:41.6Z",{"slug":416,"title":417,"type":24,"summary":418,"tags":419,"author":14,"cover_url":421,"published_at":422,"reading_minutes":186,"updated_at":423},"an-ai-media-pipeline-that-shows-its-work","An AI media pipeline that shows its work: ComfyUI presets, FlowDSL routing and the misses","How the images on my sites are generated: four ComfyUI presets behind one Go module, job rows as state, FlowDSL flows for routing, per-post media in the admin — and the bugs and model misses I hit shipping it. This post's own images were made the same way.",[329,411,409,420],"image-generation","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6aba8ba317ceba3543925be4-0-2f6b8a5c.png","2026-09-28T15:57:50Z","2026-10-01T20:47:34.327Z",{"slug":425,"title":426,"type":24,"summary":427,"tags":428,"author":14,"cover_url":430,"published_at":431,"reading_minutes":62,"updated_at":432},"openai-embeddings-python-mongodb","Transforming Text into Vectors: OpenAI Embeddings in Python","Learn how to generate text embeddings with the OpenAI API in Python to power semantic search, recommendations, and more. Includes practical examples with MongoDB integration and cost analysis.",[151,329,10,429],"mongodb","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abad0fa45201648bfd46c2d-0-2e60b732.png","2024-11-23T00:00:00Z","2026-09-28T22:31:01.385Z",{"slug":434,"title":435,"type":24,"summary":436,"tags":437,"author":14,"cover_url":439,"published_at":440,"reading_minutes":441,"updated_at":442},"check-pricing-availability-ing-domains","Last Chance to Grab Short .ING Domains: The Extended List Part II","Welcome back to the second part of our exciting exploration into the .ING domain zone! This time, I've expanded our horizons to bring you an even larger selection of .ING domain names. List of over 24,000 domain names inside.",[325,438],"business","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abad0fa45201648bfd46c38-0-c55f4c8d.png","2023-12-14T00:00:00Z",1,"2026-09-28T22:31:01.453Z",{"slug":444,"title":445,"type":24,"summary":446,"tags":447,"author":14,"cover_url":448,"published_at":449,"reading_minutes":450,"updated_at":451},"impressive-ing-domains","Unveiling the Impressive .ING Domains","Discover the vast potential of the new .ING domain zone in my latest blog post! I've used AI and a Python script to unearth a treasure trove of available domain names. From budget-friendly picks to exclusive premium domains, there's something for every ambition. Plus, a special list of unique, lesser-known domains awaits.",[325,438],"https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abad0fa45201648bfd46c43-0-03be24b7.png","2023-12-11T00:00:00Z",2,"2026-09-28T22:31:01.527Z",{"slug":453,"title":454,"type":24,"summary":455,"tags":456,"author":14,"cover_url":458,"published_at":459,"reading_minutes":62,"updated_at":460},"secured-web-server-in-5-minutes","Fortify Web Server Security in 5 Minutes with Tailscale","Tailscale revolutionizes secure networking with its user-friendly approach, effortlessly connecting devices across diverse networks.",[232,120,457],"webserver","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abad0fa45201648bfd46c4e-0-eae6f62d.png","2023-11-03T00:00:00Z","2026-09-28T22:31:01.597Z",{"slug":462,"title":463,"type":24,"summary":464,"tags":465,"author":14,"cover_url":468,"published_at":469,"reading_minutes":112,"updated_at":470},"lets-encrypt-free-ssl","How to Secure Your Website with Free SSL Certificates for a Lifetime","Let’s Encrypt certificates have revolutionized internet security by providing free, automated, and widely trusted SSL\u002FTLS certificates. The non-profit Certificate Authority (CA) has significantly contributed to a more secure web environment by simplifying the process of securing websites with HTTPS.",[466,467,457],"ssl","https","https:\u002F\u002Fmedia.stufio.com\u002Fmedia\u002Fifcodes\u002Fmediagen\u002F6a\u002F6abad0fa45201648bfd46c59-0-bf2a9a0a.png","2023-11-01T00:00:00Z","2026-09-28T22:39:13.555Z"]