Open History to see the last commit
1<!doctype html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 <title>Why T3Code Might Want Two Runtimes</title>
7 <meta
8 name="description"
9 content="Local-first multi-agent desktop apps eventually become supervision problems. An architectural experiment with Elixir/OTP and Node/TypeScript."
10 />
11 <meta property="og:title" content="Why T3Code Might Want Two Runtimes" />
12 <meta
13 property="og:description"
14 content="Local-first multi-agent desktop apps eventually become supervision problems."
15 />
16 <meta property="og:type" content="article" />
17 <meta property="og:image" content="images/memory-leak-divergence.png" />
18 <link rel="preconnect" href="https://fonts.googleapis.com" />
19 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
20 <link
21 href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=JetBrains+Mono:wght@400;500&family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap"
22 rel="stylesheet"
23 />
24 <link
25 rel="stylesheet"
26 href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css"
27 media="(prefers-color-scheme: light)"
28 />
29 <link
30 rel="stylesheet"
31 href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css"
32 media="(prefers-color-scheme: dark)"
33 />
34 <style>
35 :root {
36 --font-heading: "Newsreader", Georgia, serif;
37 --font-body: "DM Sans", -apple-system, sans-serif;
38 --font-mono: "JetBrains Mono", "Fira Code", monospace;
39 --max-w: 720px;
40 --max-w-wide: 900px;
41 --c-bg: #fafaf8;
42 --c-surface: #ffffff;
43 --c-text: #1a1a18;
44 --c-text-2: #5c5c58;
45 --c-text-3: #8a8a85;
46 --c-border: rgba(0, 0, 0, 0.08);
47 --c-border-2: rgba(0, 0, 0, 0.14);
48 --c-accent: #534ab7;
49 --c-accent-bg: #eeedfe;
50 --c-teal: #0f6e56;
51 --c-teal-bg: #e1f5ee;
52 --c-coral: #993c1d;
53 --c-code-bg: #f4f3f0;
54 --c-blockquote: #f7f6f3;
55 --c-table-header: #f4f3f0;
56 --c-table-stripe: #fafaf8;
57 }
58 @media (prefers-color-scheme: dark) {
59 :root {
60 --c-bg: #161615;
61 --c-surface: #1e1e1c;
62 --c-text: #e8e6df;
63 --c-text-2: #a3a19a;
64 --c-text-3: #6e6d68;
65 --c-border: rgba(255, 255, 255, 0.08);
66 --c-border-2: rgba(255, 255, 255, 0.14);
67 --c-accent: #afa9ec;
68 --c-accent-bg: #26215c;
69 --c-teal: #5dcaa5;
70 --c-teal-bg: #04342c;
71 --c-coral: #f0997b;
72 --c-code-bg: #252523;
73 --c-blockquote: #1e1e1c;
74 --c-table-header: #252523;
75 --c-table-stripe: #1a1a18;
76 }
77 }
78 *,
79 *::before,
80 *::after {
81 box-sizing: border-box;
82 margin: 0;
83 padding: 0;
84 }
85 html {
86 font-size: 17px;
87 scroll-behavior: smooth;
88 -webkit-font-smoothing: antialiased;
89 }
90 body {
91 font-family: var(--font-body);
92 color: var(--c-text);
93 background: var(--c-bg);
94 line-height: 1.72;
95 }
96
97 .header {
98 max-width: var(--max-w);
99 margin: 0 auto;
100 padding: 5rem 1.5rem 3rem;
101 }
102 .header-label {
103 font-family: var(--font-mono);
104 font-size: 0.7rem;
105 letter-spacing: 0.08em;
106 text-transform: uppercase;
107 color: var(--c-accent);
108 margin-bottom: 1.2rem;
109 display: block;
110 }
111 .header h1 {
112 font-family: var(--font-heading);
113 font-size: clamp(2rem, 5vw, 2.8rem);
114 font-weight: 600;
115 line-height: 1.18;
116 letter-spacing: -0.02em;
117 margin-bottom: 1rem;
118 color: var(--c-text);
119 }
120 .header .subtitle {
121 font-family: var(--font-heading);
122 font-size: 1.15rem;
123 font-style: italic;
124 color: var(--c-text-2);
125 line-height: 1.5;
126 }
127 .header .meta {
128 margin-top: 2rem;
129 padding-top: 1.5rem;
130 border-top: 1px solid var(--c-border);
131 display: flex;
132 gap: 2rem;
133 flex-wrap: wrap;
134 font-size: 0.82rem;
135 color: var(--c-text-3);
136 }
137 .header .meta a {
138 color: var(--c-accent);
139 text-decoration: none;
140 }
141 .header .meta a:hover {
142 text-decoration: underline;
143 }
144
145 article {
146 max-width: var(--max-w);
147 margin: 0 auto;
148 padding: 0 1.5rem 6rem;
149 }
150 article h2 {
151 font-family: var(--font-heading);
152 font-size: 1.65rem;
153 font-weight: 600;
154 line-height: 1.25;
155 letter-spacing: -0.015em;
156 margin: 3.5rem 0 1rem;
157 color: var(--c-text);
158 }
159 article h3 {
160 font-family: var(--font-heading);
161 font-size: 1.25rem;
162 font-weight: 500;
163 line-height: 1.35;
164 margin: 2.5rem 0 0.75rem;
165 color: var(--c-text);
166 }
167 article p {
168 margin-bottom: 1.15rem;
169 }
170 article strong {
171 font-weight: 500;
172 }
173 article a {
174 color: var(--c-accent);
175 text-decoration: underline;
176 text-decoration-thickness: 1px;
177 text-underline-offset: 2px;
178 }
179 article a:hover {
180 text-decoration-thickness: 2px;
181 }
182
183 article ul,
184 article ol {
185 margin: 0 0 1.15rem 1.5rem;
186 }
187 article li {
188 margin-bottom: 0.4rem;
189 }
190 article li::marker {
191 color: var(--c-text-3);
192 }
193
194 blockquote {
195 background: var(--c-blockquote);
196 border-left: 3px solid var(--c-accent);
197 padding: 1rem 1.25rem;
198 margin: 1.5rem 0;
199 border-radius: 0 8px 8px 0;
200 }
201 blockquote p {
202 margin-bottom: 0.5rem;
203 color: var(--c-text-2);
204 }
205 blockquote p:last-child {
206 margin-bottom: 0;
207 }
208
209 code {
210 font-family: var(--font-mono);
211 font-size: 0.82em;
212 background: var(--c-code-bg);
213 padding: 0.15em 0.4em;
214 border-radius: 4px;
215 }
216 pre {
217 background: var(--c-code-bg) !important;
218 border: 1px solid var(--c-border);
219 border-radius: 8px;
220 padding: 1.2rem 1.4rem;
221 overflow-x: auto;
222 margin: 1.5rem 0;
223 font-size: 0.82rem;
224 line-height: 1.6;
225 }
226 pre code {
227 background: none;
228 padding: 0;
229 font-size: inherit;
230 }
231
232 table {
233 width: 100%;
234 border-collapse: collapse;
235 margin: 1.5rem 0;
236 font-size: 0.88rem;
237 line-height: 1.5;
238 }
239 thead th {
240 background: var(--c-table-header);
241 font-weight: 500;
242 text-align: left;
243 padding: 0.6rem 0.8rem;
244 border-bottom: 2px solid var(--c-border-2);
245 white-space: nowrap;
246 }
247 tbody td {
248 padding: 0.55rem 0.8rem;
249 border-bottom: 1px solid var(--c-border);
250 vertical-align: top;
251 }
252 tbody tr:nth-child(even) {
253 background: var(--c-table-stripe);
254 }
255 table code {
256 font-size: 0.8em;
257 }
258
259 .wide-table {
260 max-width: var(--max-w-wide);
261 margin-left: calc((var(--max-w) - var(--max-w-wide)) / 2);
262 overflow-x: auto;
263 }
264
265 article img {
266 width: 100%;
267 max-width: var(--max-w-wide);
268 margin: 2rem auto;
269 display: block;
270 border-radius: 8px;
271 border: 1px solid var(--c-border);
272 }
273
274 .note-box {
275 background: var(--c-accent-bg);
276 border: 1px solid var(--c-accent);
277 border-radius: 8px;
278 padding: 1rem 1.25rem;
279 margin: 1.5rem 0;
280 font-size: 0.9rem;
281 color: var(--c-text-2);
282 }
283
284 .callout {
285 border: 1px solid var(--c-border-2);
286 border-radius: 8px;
287 padding: 1.25rem 1.5rem;
288 margin: 2rem 0;
289 background: var(--c-surface);
290 }
291 .callout p {
292 margin-bottom: 0.5rem;
293 }
294 .callout p:last-child {
295 margin-bottom: 0;
296 }
297
298 hr {
299 border: none;
300 border-top: 1px solid var(--c-border);
301 margin: 3rem 0;
302 }
303
304 .footer {
305 max-width: var(--max-w);
306 margin: 0 auto;
307 padding: 2rem 1.5rem 4rem;
308 border-top: 1px solid var(--c-border);
309 font-size: 0.82rem;
310 color: var(--c-text-3);
311 display: flex;
312 justify-content: space-between;
313 flex-wrap: wrap;
314 gap: 1rem;
315 }
316 .footer a {
317 color: var(--c-accent);
318 text-decoration: none;
319 }
320 .footer a:hover {
321 text-decoration: underline;
322 }
323
324 #toc {
325 position: fixed;
326 right: max(1rem, calc((100vw - 1200px) / 2));
327 top: 5rem;
328 width: 220px;
329 font-size: 0.72rem;
330 line-height: 1.6;
331 color: var(--c-text-3);
332 display: none;
333 }
334 @media (min-width: 1200px) {
335 #toc {
336 display: block;
337 }
338 }
339 #toc a {
340 display: block;
341 text-decoration: none;
342 color: var(--c-text-3);
343 padding: 2px 0 2px 12px;
344 border-left: 1.5px solid var(--c-border);
345 transition: all 0.15s;
346 }
347 #toc a:hover,
348 #toc a.active {
349 color: var(--c-accent);
350 border-left-color: var(--c-accent);
351 }
352
353 #loading {
354 max-width: var(--max-w);
355 margin: 0 auto;
356 padding: 4rem 1.5rem;
357 color: var(--c-text-3);
358 font-family: var(--font-mono);
359 font-size: 0.82rem;
360 }
361
362 @media (max-width: 640px) {
363 html {
364 font-size: 16px;
365 }
366 .header {
367 padding: 3rem 1.2rem 2rem;
368 }
369 article {
370 padding: 0 1.2rem 4rem;
371 }
372 pre {
373 padding: 1rem;
374 font-size: 0.78rem;
375 }
376 table {
377 font-size: 0.8rem;
378 }
379 thead th,
380 tbody td {
381 padding: 0.4rem 0.5rem;
382 }
383 }
384 </style>
385 </head>
386 <body>
387 <div class="header">
388 <span class="header-label">Architectural experiment</span>
389 <h1>Why T3Code might want two runtimes</h1>
390 <p class="subtitle">
391 Local-first multi-agent desktop apps eventually become supervision problems.
392 </p>
393 <div class="meta">
394 <span>Bastian Venegas Arévalo</span>
395 <span>March 2026</span>
396 <a href="https://github.com/ranvier2d2/t3code" target="_blank">View on GitHub</a>
397 <a href="https://ranvier-technologies.com" target="_blank">Ranvier Technologies</a>
398 </div>
399 </div>
400
401 <nav id="toc"></nav>
402
403 <article id="content">
404 <div id="loading">Loading post...</div>
405 </article>
406
407 <div class="footer">
408 <span
409 >6 GenServers: CodexSession, ClaudeSession, CursorSession, OpenCodeSession, MockSession,
410 SnapshotServer</span
411 >
412 <span><a href="https://github.com/ranvier2d2/t3code">T3Otp-Engine</a></span>
413 </div>
414
415 <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.2/marked.min.js"></script>
416 <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
417 <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/elixir.min.js"></script>
418 <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/typescript.min.js"></script>
419 <script>
420 marked.setOptions({
421 highlight: function (code, lang) {
422 if (lang && hljs.getLanguage(lang)) {
423 return hljs.highlight(code, { language: lang }).value;
424 }
425 return hljs.highlightAuto(code).value;
426 },
427 gfm: true,
428 breaks: false,
429 });
430
431 const imagePath = "images/";
432
433 fetch("post.md")
434 .then((r) => {
435 if (!r.ok) throw new Error("Could not load post.md");
436 return r.text();
437 })
438 .then((md) => {
439 md = md.replace(/!\[([^\]]*)\]\(output\/stress-test\/charts\//g, ";
440 md = md.replace(/!\[([^\]]*)\]\(images\//g, ";
441
442 const html = marked.parse(md);
443 document.getElementById("content").innerHTML = html;
444
445 document.querySelectorAll("article pre code").forEach((block) => {
446 if (!block.classList.length) hljs.highlightElement(block);
447 });
448
449 buildTOC();
450 setupScrollSpy();
451 })
452 .catch((err) => {
453 document.getElementById("loading").textContent =
454 "Could not load post.md — make sure it exists alongside index.html.";
455 console.error(err);
456 });
457
458 function buildTOC() {
459 const toc = document.getElementById("toc");
460 const headings = document.querySelectorAll("article h2");
461 headings.forEach((h, i) => {
462 const id = "section-" + i;
463 h.id = id;
464 const a = document.createElement("a");
465 a.href = "#" + id;
466 a.textContent = h.textContent;
467 toc.appendChild(a);
468 });
469 }
470
471 function setupScrollSpy() {
472 const links = document.querySelectorAll("#toc a");
473 const headings = document.querySelectorAll("article h2");
474 if (!headings.length) return;
475
476 const observer = new IntersectionObserver(
477 (entries) => {
478 entries.forEach((entry) => {
479 if (entry.isIntersecting) {
480 links.forEach((l) => l.classList.remove("active"));
481 const id = entry.target.id;
482 const active = document.querySelector('#toc a[href="#' + id + '"]');
483 if (active) active.classList.add("active");
484 }
485 });
486 },
487 { rootMargin: "-20% 0px -70% 0px" },
488 );
489
490 headings.forEach((h) => observer.observe(h));
491 }
492 </script>
493 </body>
494</html>