<?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: mryo0826</title>
    <description>The latest articles on DEV Community by mryo0826 (@mryo0826).</description>
    <link>https://dev.to/mryo0826</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%2F2319079%2F33796970-bb30-4791-a02a-2a6cd8720bce.png</url>
      <title>DEV Community: mryo0826</title>
      <link>https://dev.to/mryo0826</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mryo0826"/>
    <language>en</language>
    <item>
      <title>My AI Agent's VM Gets Replaced Every ~2 Hours — Measured, Then Designed For</title>
      <dc:creator>mryo0826</dc:creator>
      <pubDate>Thu, 19 Nov 2026 16:33:18 +0000</pubDate>
      <link>https://dev.to/mryo0826/my-ai-agents-vm-gets-replaced-every-2-hours-measured-then-designed-for-287a</link>
      <guid>https://dev.to/mryo0826/my-ai-agents-vm-gets-replaced-every-2-hours-measured-then-designed-for-287a</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Three notes before we start&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"Muse" in this article is not Anthropic's Claude.&lt;/strong&gt; Muse is the name of a personal AI agent product, and this article is about the Linux VM that comes with it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The AIDD practice guide is written in Japanese.&lt;/strong&gt; The canonical text of the guide mentioned below is in Japanese. If you want to read it, please run it through a translation into your own language: &lt;a href="https://github.com/mryo0826/aidd-practice-guide" rel="noopener noreferrer"&gt;https://github.com/mryo0826/aidd-practice-guide&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;This article was written with an AI collaborator.&lt;/strong&gt; It was produced in collaboration with a generative AI agent (Muse), and this English version was also translated with AI assistance.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  0. Background
&lt;/h2&gt;

&lt;p&gt;The environment in this article is the VM of Muse, which I use every day. I practice a way of working with generative AI agents that I call AIDD, and I have published a practice guide for it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AIDD practice guide: &lt;a href="https://github.com/mryo0826/aidd-practice-guide" rel="noopener noreferrer"&gt;https://github.com/mryo0826/aidd-practice-guide&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of AIDD's premises is: keep continuity on the file side, and treat sessions and execution environments as disposable. The countermeasures in this article apply that same premise to the VM side.&lt;/p&gt;

&lt;p&gt;In the overall AIDD setup, Opus (Claude Code, on the Claude Pro plan), who handles internal affairs, owns the canonical documents, while this Muse handles external affairs — posting to outside venues and dealing with platforms. The two communicate by letters (round trips through a GitHub mailbox repository). Inbox checks are run as follows: on the Muse side, scheduled checks twice a day plus ad hoc checks as needed; on the Opus side, a check at session start plus ad hoc checks when the human asks. Muse itself runs on a free account; the only actual payment is Opus's Claude Pro plan.&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%2F8r4b501u1exkuthqgt83.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%2F8r4b501u1exkuthqgt83.png" alt="The overall AIDD setup" width="800" height="612"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here is this Muse's home structure. What this article calls "what survives" is this structure as a whole.&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%2Fxl7l88jdxu5r916x0uj4.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%2Fxl7l88jdxu5r916x0uj4.png" alt="Muse's home structure" width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;Muse is a personal AI agent that comes with one Linux virtual machine (VM) per user. The agent creates files, runs programs, and operates a browser on that VM. "The AI has its own computer" is a defining feature of this product.&lt;/p&gt;

&lt;p&gt;But that computer had no fixed address. My Muse's VM is replaced by a different instance roughly once every two hours, running processes and all. Files survive, but work in progress vanishes. I first noticed this when a video render disappeared in the middle of rendering.&lt;/p&gt;

&lt;p&gt;This article covers the results of actually measuring how often the replacement happens, and how I redesigned the work around that premise. I do not know why it gets replaced — there is no information from the platform side. Every number in this article is limited to what I measured in my own environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. How I Measured It
&lt;/h2&gt;

&lt;p&gt;"It gets replaced sometimes" is not enough to design against, so I decided to measure it first.&lt;/p&gt;

&lt;p&gt;The method is simple: periodically check the kernel's boot ID. On Linux, every boot assigns a new UUID to &lt;code&gt;/proc/sys/kernel/random/boot_id&lt;/code&gt;. I read it every five minutes, and if it differs from the previous value, I append the detection time and the old and new IDs to a log file. The boot time is an estimate back-calculated from the uptime at the moment of detection.&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%2Fh1i38fpig1uf83ath6n8.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%2Fh1i38fpig1uf83ath6n8.png" alt="Flowchart of the boot-watch hook: poll boot_id every five minutes and log any change" width="421" height="846"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the actual script (the parts that follow the platform's hook conventions are partly omitted).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; -euo pipefail

&lt;span class="nv"&gt;STATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$HOME/hooks/state/vm-boot-watch.boot_id"&lt;/span&gt;   &lt;span class="c"&gt;# where the previous boot_id is stored&lt;/span&gt;
&lt;span class="nv"&gt;LOG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$HOME/workspace/worklog/vm-boots.md"&lt;/span&gt;          &lt;span class="c"&gt;# the observation log&lt;/span&gt;
&lt;span class="nv"&gt;CUR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$(cat /proc/sys/kernel/random/boot_id)"&lt;/span&gt;
&lt;span class="nv"&gt;UP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$(cut -d' ' -f1 /proc/uptime | cut -d. -f1)"&lt;/span&gt;
&lt;span class="nv"&gt;NOW&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$(TZ=Asia/Tokyo date '+%Y-%m-%d %H:%M:%S')"&lt;/span&gt;
&lt;span class="nv"&gt;BOOT_TS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$(TZ=Asia/Tokyo date -d "&lt;/span&gt;@&lt;span class="nv"&gt;$(&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$(&lt;/span&gt;date +%s&lt;span class="o"&gt;)&lt;/span&gt; - UP &lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;" '+%Y-%m-%d %H:%M:%S')"&lt;/span&gt;

&lt;span class="nv"&gt;PREV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$(cat "&lt;/span&gt;&lt;span class="nv"&gt;$STATE&lt;/span&gt;&lt;span class="s2"&gt;")"&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"$CUR"&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"$PREV"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
  &lt;span class="nb"&gt;exit&lt;/span&gt; 0   &lt;span class="c"&gt;# no change&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="c"&gt;# generation change detected: append to the log and update the saved ID&lt;/span&gt;
&lt;span class="nb"&gt;printf&lt;/span&gt; -- &lt;span class="s2"&gt;"- %s JST detected: VM generation change boot_id %s -&amp;gt; %s (new generation estimated boot %s JST)\n"&lt;/span&gt; \
  &lt;span class="s2"&gt;"$NOW"&lt;/span&gt; &lt;span class="s2"&gt;"$PREV"&lt;/span&gt; &lt;span class="s2"&gt;"$CUR"&lt;/span&gt; &lt;span class="s2"&gt;"$BOOT_TS"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"$LOG"&lt;/span&gt;
&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%s'&lt;/span&gt; &lt;span class="s2"&gt;"$CUR"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"$STATE"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I started observing at 22:39 on 2026-11-17. Since the detection interval is five minutes, a generation that is replaced within less than five minutes may be missed. With that caveat, here are the results.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. What I Measured
&lt;/h2&gt;

&lt;p&gt;Between 22:28 on 2026-11-17 and 23:06 on 2026-11-18 — about 24.6 hours — &lt;strong&gt;14 generations&lt;/strong&gt; appeared. The median lifetime of a generation was &lt;strong&gt;about 116 minutes&lt;/strong&gt;; the shortest was 33 minutes and the longest 165 minutes.&lt;/p&gt;

&lt;p&gt;The replacements happen regardless of user activity. They also occurred at 02:10 and 04:55, while I was asleep. Whether I am working or not, and whether the machine is under load or not, a generation reaches the end of its life in roughly two hours — that is the picture the measurements give.&lt;/p&gt;

&lt;p&gt;(Update) I kept observing, and as of 17:13 on 2026-11-19 the total reached &lt;strong&gt;28 generations over 42.8 hours&lt;/strong&gt;. The median lifetime is 113 minutes and the trend is unchanged, but on the morning of 11-19 there was a stretch where extremely short generations — lifetimes of 2, 6, and 9 minutes — appeared in a cluster. I do not yet know what governs when the short ones appear. The distribution of lifetimes across 27 generations is as follows.&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;xychart-beta
    title "Distribution of generation lifetimes (27 generations, in minutes)"
    x-axis ["0-30", "30-60", "60-90", "90-120", "120-150", "150-180"]
    y-axis "Generations" 0 --&amp;gt; 10
    bar [4, 2, 3, 7, 10, 1]&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  4. What Breaks and What Survives
&lt;/h2&gt;

&lt;p&gt;What survives a generation change and what vanishes is cleanly split.&lt;/p&gt;

&lt;p&gt;What survives is every file under the home directory. Work files, settings, records, and the tools and libraries installed on the home side are all still usable in the next generation, exactly as they were.&lt;/p&gt;

&lt;p&gt;Three kinds of things vanish: running processes, the contents of &lt;code&gt;/tmp&lt;/code&gt;, and changes to the system area (packages installed with apt, writes under &lt;code&gt;/usr&lt;/code&gt;, and the like).&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%2Fjdqt07z9fszz01wh274n.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%2Fjdqt07z9fszz01wh274n.png" alt="What survives in the home directory and what vanishes outside it" width="380" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The concrete damage was a video render. What vanished was the drawing of a vertical short video (the Merrow version) of "The Pencil That Gets Shorter," a song I make together with Muse. At frame 960 of 1,857, the whole VM disappeared and the process was nowhere to be found. With the output file only half-written, I could not even call it a "failure" — left alone, you cannot tell whether it finished or vanished.&lt;/p&gt;

&lt;p&gt;Here is the full version of that song.&lt;/p&gt;

&lt;p&gt;Merrow version:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/Z0MhsYhE0U0" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Reina version:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/8aBN9pV5b0A" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Designing Around It
&lt;/h2&gt;

&lt;p&gt;With the premise set to "the VM disappears in about two hours," the countermeasures narrowed down to three.&lt;/p&gt;

&lt;p&gt;The first is to launch long-running work in a form where its state is visible. In my environment I built a small mechanism called job-runner, which manages job states in four values: DONE (completed), FAILED (failed), RUNNING (in progress), and LOST (vanished without a trace). A job with no exit-code record and no live lock is LOST; I treat it as "consumed by a VM generation change" and re-run it idempotently. Heavy jobs are serialized with a lock, to at most one at a time.&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%2F0hucuc61gxu12qi2flpt.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%2F0hucuc61gxu12qi2flpt.png" alt="Sequence diagram of the job runner: a lost job is detected and re-run" width="799" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the actual launcher.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="c"&gt;# job-runner.sh &amp;lt;job_id&amp;gt; &amp;lt;expected_out|-&amp;gt; &amp;lt;cmd...&amp;gt;&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; -u
&lt;span class="nv"&gt;JOBS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$HOME/workspace/.jobs"&lt;/span&gt;
&lt;span class="nv"&gt;JOB_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$1"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;EXPECTED&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$2"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;shift&lt;/span&gt; 2
&lt;span class="nv"&gt;JD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$JOBS/$JOB_ID"&lt;/span&gt;
mkdir -p &lt;span class="s2"&gt;"$JD"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$EXPECTED"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"$JD/expected.out"&lt;/span&gt;
&lt;span class="c"&gt;# global lock: only one heavy job at a time (BUSY if it cannot be acquired)&lt;/span&gt;
&lt;span class="nb"&gt;exec&lt;/span&gt; 9&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"$JOBS/global.lock"&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; ! flock -n 9&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"BUSY"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit&lt;/span&gt; 75&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="c"&gt;# per-job lock: prevents the same job from being launched twice&lt;/span&gt;
&lt;span class="nb"&gt;exec&lt;/span&gt; 8&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"$JD/job.lock"&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; ! flock -n 8&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"ALREADY_RUNNING"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit&lt;/span&gt; 74&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;fi&lt;/span&gt;
rm -f &lt;span class="s2"&gt;"$JD/job.exit"&lt;/span&gt;
&lt;span class="s2"&gt;"$@"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"$JD/job.log"&lt;/span&gt; 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1
&lt;span class="nv"&gt;CODE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$?&lt;/span&gt;
&lt;span class="c"&gt;# write the exit code atomically, via a tmp file&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$CODE"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"$JD/job.exit.tmp"&lt;/span&gt;
mv &lt;span class="s2"&gt;"$JD/job.exit.tmp"&lt;/span&gt; &lt;span class="s2"&gt;"$JD/job.exit"&lt;/span&gt;
&lt;span class="nb"&gt;exit&lt;/span&gt; &lt;span class="s2"&gt;"$CODE"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;State is determined only by the combination of whether an exit record exists and whether the lock is alive.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Exit record&lt;/th&gt;
&lt;th&gt;Lock&lt;/th&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Present (0, and the output exists)&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;DONE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Present (non-zero)&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;FAILED&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Absent&lt;/td&gt;
&lt;td&gt;Alive&lt;/td&gt;
&lt;td&gt;RUNNING&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Absent&lt;/td&gt;
&lt;td&gt;Gone&lt;/td&gt;
&lt;td&gt;LOST&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The second is to split work into small chunks. Video rendering is split into 10-second chunks; a finished chunk is verified by its length and skipped, only the remainder is drawn, and everything is joined at the end. Even if a generation change hits mid-way, at most one chunk is lost. This turned out to be exactly the same shape as the Scrum discipline of splitting tasks into predictable units and producing outputs that are in a releasable state.&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%2Fysqv16dx2yzakbf1suhv.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%2Fysqv16dx2yzakbf1suhv.png" alt="Flowchart of segmented rendering: completed segments are skipped" width="404" height="1124"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The third is to keep continuity on the file side. The current state of the work is recorded as small, timestamped entries appended to a work log. VMs and sessions are both disposable; when resuming, you read that file first and then start. If files are the only thing that survives, putting the state in files too was the natural conclusion.&lt;/p&gt;

&lt;p&gt;One more note: I do not send notifications for generation changes themselves. Being told about something that happens every day would just be noise, so notifications happen only when a job is suspected to be LOST.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. What I Don't Know
&lt;/h2&gt;

&lt;p&gt;I don't know why it gets replaced. It could be periodic deployments, or resource reclamation; the platform side publishes no information, and I have no way to check. I also formed a hypothesis — "maybe memory usage crossed a threshold" — but I could not verify that one either.&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%2Fa2nwngt7tvtzvwpsh2fa.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%2Fa2nwngt7tvtzvwpsh2fa.png" alt="Three hypotheses for the replacements, all unconfirmed" width="744" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As for frequency, the numbers in this article cover only the observation window from 2026-11-17 to 19. The interval could grow longer or shorter in the future. Leaving what I don't know as unknown, if I design on the premise "it disappears in about two hours," the design holds even if the frequency shifts somewhat.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. A Second Issue: Environment Freshness
&lt;/h2&gt;

&lt;p&gt;The fact that "changes to the system area vanish" was directly connected to security updates.&lt;/p&gt;

&lt;p&gt;When I took inventory on the night of 2026-11-18, the VM's Node.js was still at 24.22.1 and had not reached 24.22.3, the release that addresses 16 vulnerabilities. The Python libraries were also still on old versions. Even if you upgrade with apt, the next generation change rolls everything back. The practice of "keeping the system side up to date" does not hold in this environment in the first place.&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%2F4yy1xsak7h9zkeg4xp3m.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%2F4yy1xsak7h9zkeg4xp3m.png" alt="The freshness cycle: system updates vanish at the next generation change" width="216" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Security freshness is not something you can afford to look at leisurely, once a month. In the field, responses run on weekends too; it is a day-to-day problem. So I made the countermeasure two-layered: move the tools and libraries I depend on over to the home side, and check freshness automatically every week, receiving a report only when there is a diff.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Putting It into Practice
&lt;/h2&gt;

&lt;p&gt;This inventory was a countermeasure against generation changes, and at the same time an opportunity to review and optimize the architecture on my Muse side. I moved what had depended on the system area over to the home side, manage the locations and versions of tools in a registry, and measure freshness weekly. The overall home structure is the diagram in section 0; here I will list only what changed.&lt;/p&gt;

&lt;p&gt;Here is what I actually did.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;What I did&lt;/th&gt;
&lt;th&gt;Measurements / notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Node.js&lt;/td&gt;
&lt;td&gt;Placed 24.22.3 on the home side and switched to it&lt;/td&gt;
&lt;td&gt;Track the latest patches in the 24 line. The decision on moving to the next major version will be made within 2027&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python libraries&lt;/td&gt;
&lt;td&gt;Placed updated versions on the home side&lt;/td&gt;
&lt;td&gt;Pillow 13.0.0, numpy 2.5.5, and others. They survive generation changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python itself&lt;/td&gt;
&lt;td&gt;Installed 3.15.2 side by side using uv, and made it the default for the drawing pipeline&lt;/td&gt;
&lt;td&gt;About 18% faster on a 240-frame render. Output matched pixel for pixel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pillow&lt;/td&gt;
&lt;td&gt;Switched to the SIMD-optimized build (pillow-allsimd)&lt;/td&gt;
&lt;td&gt;Rendering about 1.73x faster. Output completely identical&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FFmpeg&lt;/td&gt;
&lt;td&gt;Kept the platform-custom 8.1.2 as is&lt;/td&gt;
&lt;td&gt;Watching the 8.1 line for new releases and security information&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Freshness check&lt;/td&gt;
&lt;td&gt;Runs automatically every week&lt;/td&gt;
&lt;td&gt;Reports only when there is a diff, with security diffs placed first&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I also added a practice: whenever a tool is added to or updated on the VM, record it in the registry. In an environment you cannot see into, a tool with no record is the same as a tool that does not exist.&lt;/p&gt;

&lt;p&gt;Rendering speed changed with this review, too. These are the measured seconds it took to draw the same 240 frames.&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%2Fdrnrli9g00tqhdglbrup.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%2Fdrnrli9g00tqhdglbrup.png" alt="Bar chart of rendering time for 240 frames: Python 3.12 + Pillow, Python 3.15 + Pillow, and Python 3.15 + pillow-allsimd" width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because the CPU is shared, the absolute values swing with the load at the time. Comparing ratios under the same conditions, moving to Python 3.15 gave about 0.82x, pillow-allsimd about 0.58x, and combined, rendering took roughly half the time or less. In every case, I switched only after confirming that the output matched byte for byte and pixel for pixel.&lt;/p&gt;

&lt;p&gt;I measured one more thing: Python 3.15's experimental JIT compiler. In my build it can be enabled with &lt;code&gt;PYTHON_JIT=1&lt;/code&gt;, but the same 240-frame render took about 24.3 seconds with it enabled and about 24.2 seconds with it disabled — within the margin of error. The output matched as well. The weight of the drawing sits on Pillow's native processing side, so this was not a place where a JIT, which speeds up Python bytecode, could take effect — that is my reading of the measurement.&lt;/p&gt;

&lt;p&gt;Even in the official numbers, the 3.15 JIT's improvement is stated as a geometric mean of 7–8% on pyperformance (x86-64 Linux), which is not something that changes the order of magnitude. Furthermore, PEP 836, which proposed the JIT's survival, was withdrawn in October 2026, and the JIT is expected to be removed from the core from 3.16 onward. What I measured and found ineffective, I did not adopt.&lt;/p&gt;

&lt;p&gt;Sources I consulted:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.15 official documentation (build configuration): &lt;a href="https://docs.python.org/3.15/using/configure.html" rel="noopener noreferrer"&gt;https://docs.python.org/3.15/using/configure.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Real Python, "Python's JIT Compiler: What's New in Python 3.15": &lt;a href="https://realpython.com/python315-jit-compiler/" rel="noopener noreferrer"&gt;https://realpython.com/python315-jit-compiler/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Authon, "Python's JIT Is Being Removed After a 7-8% Gain": &lt;a href="https://blog.authon.dev/python-jit-removed-what-actually-makes-python-faster" rel="noopener noreferrer"&gt;https://blog.authon.dev/python-jit-removed-what-actually-makes-python-faster&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this review, Gemini (Hydrogen, in thinking mode) took on the role of bringing in the general knowledge about tools and libraries. I did not adopt the general claims as they were; I used them by separating, against the measurements on my own setup, where they applied and where they did not. My thanks for the cooperation.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I don't know why it gets replaced. But if you measure the frequency, it can become a premise for design&lt;/li&gt;
&lt;li&gt;Do not depend on what vanishes (processes, &lt;code&gt;/tmp&lt;/code&gt;, the system area); put state and tools in what survives (files under home)&lt;/li&gt;
&lt;li&gt;Split long work into chunks that can be detected when lost and resumed from the middle&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As long as it remains a vague feeling of "it gets replaced sometimes," you are surprised every time it vanishes and lose time on recovery. Measure it and turn it into a premise, and a generation change is no longer an incident — it is simply a property of the environment.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>devops</category>
      <category>python</category>
    </item>
  </channel>
</rss>
