<?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: Carlos Rivera</title>
    <description>The latest articles on DEV Community by Carlos Rivera (@carlos).</description>
    <link>https://dev.to/carlos</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%2F599640%2F67319062-47ee-4fab-94b2-699365d683e4.jpeg</url>
      <title>DEV Community: Carlos Rivera</title>
      <link>https://dev.to/carlos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/carlos"/>
    <language>en</language>
    <item>
      <title>How We Took Second at a Hackathon with Codex and 18 Git Worktrees</title>
      <dc:creator>Carlos Rivera</dc:creator>
      <pubDate>Mon, 09 Nov 2026 01:43:04 +0000</pubDate>
      <link>https://dev.to/carlos/how-we-took-second-at-a-hackathon-with-codex-and-18-git-worktrees-n1b</link>
      <guid>https://dev.to/carlos/how-we-took-second-at-a-hackathon-with-codex-and-18-git-worktrees-n1b</guid>
      <description>&lt;p&gt;A friend and I took second place at the Codex Community hackathon in Guadalajara with Panas. Across roughly 47 hours, we used 18 Git worktrees and merged 44 pull requests. The Codex usage I recovered from my machine would cost &lt;strong&gt;about $162 USD at standard OpenAI API rates, before credits&lt;/strong&gt;. The hackathon gave us both API credits and Codex credits.&lt;/p&gt;

&lt;p&gt;One merge explains how we worked. Three branches were ready for review. When we brought them together, the registry branch hit a conflict in the shared contracts package. After we resolved it, CI surfaced a provider test that timed out on the Linux runner. The worktrees let the agents make progress in parallel. Review and CI told us whether we could merge that progress.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we were building
&lt;/h2&gt;

&lt;p&gt;Panas lets an agent find an idle machine, agree on a price, and run an inference job over a peer-to-peer connection. The buyer uses MCP, MCPWire handles the connection, and the provider runs the model in a sandbox. The demo provider served Qwen 2.5 0.5B. &lt;a href="https://github.com/carlosrivera/panas" rel="noopener noreferrer"&gt;Panas source&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How we split the work
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Turn the PRD into a dependency map.&lt;/strong&gt; We wrote down how buyers discover providers, what makes a machine ready, how a job is bounded, and how payment gets verified. Then we turned those decisions into GitHub issues. After PR #11 set up the workspace, shared types, and CI, provider, transport, and registry could start in parallel. The buyer could scaffold against shared types, with end-to-end verification waiting on those pieces and accounting. &lt;a href="https://github.com/carlosrivera/panas/blob/main/docs/PRD.md" rel="noopener noreferrer"&gt;PRD&lt;/a&gt; · &lt;a href="https://github.com/carlosrivera/panas/blob/main/docs/team-plan.md" rel="noopener noreferrer"&gt;Team plan&lt;/a&gt; · &lt;a href="https://github.com/carlosrivera/panas/pull/11" rel="noopener noreferrer"&gt;Foundation PR&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Give each agent a branch and a check it can run.&lt;/strong&gt; The provider had to run inference on a real Mac and stay out of discovery until it was ready. The transport had to complete a peer round trip and survive a disconnect. The registry had to support authenticated discovery against a deployed endpoint. The coordinating session handled changes to shared contracts while the child agents worked in separate checkouts. &lt;a href="https://github.com/carlosrivera/panas/pull/16" rel="noopener noreferrer"&gt;Provider PR&lt;/a&gt; · &lt;a href="https://github.com/carlosrivera/panas/pull/17" rel="noopener noreferrer"&gt;Transport PR&lt;/a&gt; · &lt;a href="https://github.com/carlosrivera/panas/pull/18" rel="noopener noreferrer"&gt;Registry PR&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Combine the branches in an integration worktree.&lt;/strong&gt; Cross-review caught a registry bug where a provider marked unhealthy could reuse old capability evidence. We added a regression test and required fresh evidence after a failure or key rotation. The combined checkout passed 43 tests, along with formatting, lint, type checks, and the build.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Merge in order and rerun the checks.&lt;/strong&gt; After review, I asked Codex to merge the three PRs. Provider and transport went first. Codex resolved the registry conflict, then used the CI failure log to find the provider test timeout. It widened the test's polling window while preserving the concurrency assertions, reran the checks, and merged the registry PR once CI passed.&lt;/p&gt;

&lt;p&gt;That workflow ran across &lt;strong&gt;18 worktrees&lt;/strong&gt;, including feature branches and integration checkouts. In the same window, we opened &lt;strong&gt;21 issues&lt;/strong&gt;, merged &lt;strong&gt;44 PRs&lt;/strong&gt;, and recorded &lt;strong&gt;155 commits in the history reachable from main&lt;/strong&gt;, including 47 merge commits. &lt;a href="https://github.com/carlosrivera/panas/pulls?q=is%3Apr+is%3Amerged" rel="noopener noreferrer"&gt;GitHub PRs&lt;/a&gt; · &lt;a href="https://github.com/carlosrivera/panas/commits/main/" rel="noopener noreferrer"&gt;Commit history&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Follow one round from delegation to merge
&lt;/h2&gt;

&lt;p&gt;The excerpt starts with my request to split three issues in parallel. Open the tool calls for worktree creation, delegation, the merge conflict, and the CI timeout. Some commands and outputs are abridged.&lt;/p&gt;


&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Codex"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;Panas: the first parallel wave, with tool calls&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;ok, lets merge the foundations PR and start tackling issues #2, #3 and #4 in parallel&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I’ll check and merge the foundation PR, then start issues #2, #3, and #4 with separate agents and worktrees so the implementations can proceed in parallel.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;gh pr merge 11 -R carlosrivera/panas --squash --match-head-commit 4f4b3d9c01e...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;gh pr merge 11 -R carlosrivera/panas --squash --match-head-commit 4f4b3d9c01e46550c6a4d185efa042ec859f0343&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;git worktree add -b codex/issue-2-provider ~/code/panas-worktrees/provider or...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;git worktree add -b codex/issue-2-provider ~/code/panas-worktrees/provider origin/main; git worktree add -b codex/issue-3-transport ~/code/panas-worktrees/transport origin/main; git worktree add -b codex/issue-4-registry ~/code/panas-worktrees/registry origin/main&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Preparing worktree (new branch 'codex/issue-2-provider')
Preparing worktree (new branch 'codex/issue-3-transport')
Preparing worktree (new branch 'codex/issue-4-registry')&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-followuptask"&gt;followup_task&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;{"target":"team_plan"}&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"team_plan"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-followuptask"&gt;followup_task&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;{"target":"web_foundation"}&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"web_foundation"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-spawnagent"&gt;spawn_agent&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;{"task_name":"registry"}&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"task_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"registry"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;PR #11 is merged, and foundation issue #1 is closed. Three agents are now working from that merged baseline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;#2:&lt;/strong&gt; macOS capability tests and the persistent inference daemon.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;#3:&lt;/strong&gt; MCPWire process supervision, cleanup, and peer probing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;#4:&lt;/strong&gt; durable provider registration and agent discovery on Volcano.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ll coordinate the shared contracts and review their integration points. The local site remains running.&lt;/p&gt;

                &lt;/div&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The provider needs real hardware evidence as well as fixture tests. I’ll set up Ollama in the project’s ignored local directory and fetch the small test model—about 400 MB—so we can validate inference on this Mac without installing a system-wide service.&lt;/p&gt;

                &lt;/div&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The three lanes have agreed on capability reports and peer-probe results. The registry agent has provisioned a dedicated Postgres database in the Panas project and is implementing signed provider registration plus authenticated MCP discovery.&lt;/p&gt;

&lt;p&gt;Ollama is running on a loopback-only test port and detects this Mac’s Metal GPU. The small model is downloading for the provider’s real inference checks.&lt;/p&gt;

                &lt;/div&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;All three lanes now have passing component tests. The provider’s real Mac capability test passed with the pinned small model, and it correctly stays undiscoverable until a peer probe verifies connectivity.&lt;/p&gt;

&lt;p&gt;During review, I found a deadline gap around the provider’s metadata check. The agent is tightening that bound before opening its PR. The registry is testing against cloud Postgres, and transport is running a real MCPWire peer round trip.&lt;/p&gt;

                &lt;/div&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The MCPWire smoke test passed: separate peer processes completed a round trip, disconnecting a peer left the daemon running, and restarting the host produced a new ticket.&lt;/p&gt;

&lt;p&gt;The registry’s Postgres integration tests also passed. Its HTTP function is deploying now; next is a discovery call through an official MCP client against that deployed endpoint.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;git worktree add -b codex/integration-issues-2-4 ~/code/panas-worktrees/integ...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;git worktree add -b codex/integration-issues-2-4 ~/code/panas-worktrees/integration origin/main&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Preparing worktree (new branch 'codex/integration-issues-2-4')&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;git merge --no-edit codex/issue-2-provider; git merge --no-edit codex/issue-3...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;git merge --no-edit codex/issue-2-provider; git merge --no-edit codex/issue-3-transport&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-followuptask"&gt;followup_task&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;{"target":"web_foundation"}&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"web_foundation"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;PRs are open for the provider and transport work. Registry discovery has also passed a call through an official MCP client against the deployed Volcano endpoint, and it rejects unauthenticated requests.&lt;/p&gt;

&lt;p&gt;I’m combining the three branches in a local integration worktree to check for shared-schema conflicts and run the full suite. Only the foundation PR has been merged into &lt;code&gt;main&lt;/code&gt;; the new PRs will stay open for review.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;git merge --no-edit codex/issue-2-provider&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;git merge --no-edit codex/issue-2-provider&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Cross-review found one readiness gap in the registry: a provider could reuse old capability evidence after being marked unhealthy. The agent is fixing that transition and adding a regression test before opening the PR.&lt;/p&gt;

&lt;p&gt;The provider and transport PRs have passed CI. The remaining check is to combine all three implementations and run the repository suite.&lt;/p&gt;

                &lt;/div&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The local site is still running. I’ve shut down the temporary Ollama test server after the hardware checks; the runtime and small model remain in the project’s ignored local directory for reuse.&lt;/p&gt;

&lt;p&gt;The registry fix now distinguishes first-time verification from evidence that was retired after a failure. That lets a fresh provider complete its peer probe while requiring new tests after an unhealthy state or key rotation.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;git merge --no-edit codex/issue-4-registry&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;git merge --no-edit codex/issue-4-registry&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;CONFLICT (content): Merge conflict in packages/contracts/package.json
Automatic merge failed; fix conflicts and then commit the result.&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;git checkout --theirs packages/contracts/package.json
git add packages/contra...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;git checkout --theirs packages/contracts/package.json
git add packages/contracts/package.json
git commit --no-edit
pnpm install --frozen-lockfile
pnpm format:check
pnpm check&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Poll the integration validation command and check PR #18&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Poll the integration validation command and check PR #18&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Test Files  7 passed | 2 skipped (9)
Tests  43 passed | 8 skipped (51)&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;All three PRs are ready for review and have passed CI. The combined branch also passed formatting, lint, typechecks, the web build, and &lt;strong&gt;43 tests&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Separate checks covered real Mac inference, a real MCPWire peer round trip, seven Postgres integration tests, and discovery through the deployed MCP endpoint. The new PRs remain open; only the foundations are merged into &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

                &lt;/div&gt;
                &lt;div&gt;
                  &lt;div class="agent-session-text agent-session-text-collapse"&gt;
                    &lt;p&gt;Merged &lt;a href="https://github.com/carlosrivera/panas/pull/11" rel="noopener noreferrer"&gt;foundation PR #11&lt;/a&gt; and closed issue #1.&lt;/p&gt;

&lt;p&gt;The parallel work is implemented in three review-ready PRs:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Issue&lt;/th&gt;
&lt;th&gt;Implementation&lt;/th&gt;
&lt;th&gt;PR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;#2&lt;/td&gt;
&lt;td&gt;macOS capability tests and persistent inference daemon&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/carlosrivera/panas/pull/16" rel="noopener noreferrer"&gt;#16&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#3&lt;/td&gt;
&lt;td&gt;MCPWire lifecycle supervision and peer probes&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/carlosrivera/panas/pull/17" rel="noopener noreferrer"&gt;#17&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#4&lt;/td&gt;
&lt;td&gt;Durable registry and authenticated MCP discovery&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/carlosrivera/panas/pull/18" rel="noopener noreferrer"&gt;#18&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All three passed CI. The combined branch passed &lt;strong&gt;43 tests&lt;/strong&gt;, typechecks, lint, and build. Separate checks verified real Mac inference, MCPWire peers, Postgres, and deployed MCP discovery.&lt;/p&gt;

&lt;p&gt;The new PRs remain &lt;strong&gt;unmerged for review&lt;/strong&gt;. Your &lt;a href="http://localhost:3333" rel="noopener noreferrer"&gt;local app&lt;/a&gt; is still running.&lt;/p&gt;

                  &lt;/div&gt;
                  Show more
                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;merge them&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I’ll check the latest CI results, merge all three PRs, and resolve the shared-contract overlap as needed. Then I’ll update local &lt;code&gt;main&lt;/code&gt; and verify it.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;gh pr merge 16 -R carlosrivera/panas --squash --match-head-commit f4699a28a2e...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;gh pr merge 16 -R carlosrivera/panas --squash --match-head-commit f4699a28a2e1f2172414afd3ce5ec17722fb90b4
gh pr merge 17 -R carlosrivera/panas --squash --match-head-commit 1fcae1465da2129111f31e472561f3820fd14ceb
git fetch origin
gh pr view 18 -R carlosrivera/panas --json mergeable,mergeStateStatus&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;git status --short; git merge --no-edit origin/main&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;git status --short; git merge --no-edit origin/main&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;CONFLICT (content): Merge conflict in packages/contracts/package.json
Automatic merge failed; fix conflicts and then commit the result.&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;git checkout --ours packages/contracts/package.json
git add packages/contract...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;git checkout --ours packages/contracts/package.json
git add packages/contracts/package.json
git commit --no-edit
pnpm install --frozen-lockfile
pnpm format:check
pnpm check&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;git push origin codex/issue-4-registry
gh pr checks 18 -R carlosrivera/panas ...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;git push origin codex/issue-4-registry
gh pr checks 18 -R carlosrivera/panas --watch --interval 10&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The provider and transport PRs are merged. I resolved the registry PR’s shared-export conflict, and the combined code passed all 43 tests and the repository checks. I’m waiting for CI on that updated registry branch before merging it.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;gh run view 40803680384 -R carlosrivera/panas --log-failed&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;gh run view 40803680384 -R carlosrivera/panas --log-failed&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;apps/provider/src/provider.test.ts (17 tests | 1 failed)
Error: condition timed out&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;CI caught a timing-sensitive provider test: it allowed roughly 200 ms for several durable filesystem writes, and the Linux runner exceeded that budget. I’ll give the test a bounded CI-appropriate wait while keeping its concurrency assertions, then rerun the checks before merging.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Edit apps/provider/src/provider.test.ts. Change the polling bound from 100 at...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Edit apps/provider/src/provider.test.ts. Change the polling bound from 100 attempts at 2 ms to 300 attempts at 10 ms, then rerun the checks.&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Poll the registry validation command&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Poll the registry validation command&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Test Files  7 passed | 2 skipped (9)
Tests  43 passed | 8 skipped (51)&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;git add apps/provider/src/provider.test.ts
git commit -m "Allow bounded CI di...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;git add apps/provider/src/provider.test.ts
git commit -m "Allow bounded CI disk latency in durable worker tests"
git push origin codex/issue-4-registry&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;gh pr checks 18 -R carlosrivera/panas --watch --interval 10&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;gh pr checks 18 -R carlosrivera/panas --watch --interval 10&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;gh pr merge 18 -R carlosrivera/panas --squash --match-head-commit [verified h...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;gh pr merge 18 -R carlosrivera/panas --squash --match-head-commit [verified head]
git pull --ff-only origin main&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;null&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-exec"&gt;exec&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Poll merge and verification command&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Poll merge and verification command&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;PR 16 MERGED
PR 17 MERGED
PR 18 MERGED&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Merged &lt;a href="https://github.com/carlosrivera/panas/pull/16" rel="noopener noreferrer"&gt;#16&lt;/a&gt;, &lt;a href="https://github.com/carlosrivera/panas/pull/17" rel="noopener noreferrer"&gt;#17&lt;/a&gt;, and &lt;a href="https://github.com/carlosrivera/panas/pull/18" rel="noopener noreferrer"&gt;#18&lt;/a&gt;. Issues #2–#4 are closed.&lt;/p&gt;

&lt;p&gt;CI passed with all 43 tests. Local &lt;code&gt;main&lt;/code&gt; is updated, and &lt;a href="http://localhost:3333" rel="noopener noreferrer"&gt;localhost:3333&lt;/a&gt; is still running.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        34 of 34 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Where the 787 million tokens went
&lt;/h2&gt;

&lt;p&gt;I recovered 16 Codex sessions from my machine. They span the PRD, issue planning, implementation, review, tests, CI and deployment fixes, onboarding, and the hackathon demo and submission. The main session and three child sessions handled most of that activity. The child sessions started with team planning, web foundation, and registry assignments, then took on follow-up work. Their totals describe the whole sessions. The logs don't give me a clean per-task split.&lt;/p&gt;

&lt;p&gt;Cached input accounted for about &lt;strong&gt;99%&lt;/strong&gt; of the recorded token volume. As an agent worked through a branch, later requests could reuse earlier context, including conversation and tool results. That context accounts for most of the token headline and most of the API estimate. &lt;a href="https://developers.openai.com/api/docs/guides/prompt-caching" rel="noopener noreferrer"&gt;OpenAI prompt caching&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Recorded usage&lt;/th&gt;
&lt;th&gt;Tokens&lt;/th&gt;
&lt;th&gt;Estimated API cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cached input&lt;/td&gt;
&lt;td&gt;777.2 million&lt;/td&gt;
&lt;td&gt;$113.47&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uncached input&lt;/td&gt;
&lt;td&gt;7.4 million&lt;/td&gt;
&lt;td&gt;$18.72&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output&lt;/td&gt;
&lt;td&gt;2.5 million&lt;/td&gt;
&lt;td&gt;$30.17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total before credits&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;787.1 million&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;About $162&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I priced each recovered request using its logged model and the published standard API rates. GPT-6.1 Sol handled most of the work. Two later sessions used GPT-6.1 Terra. The estimate includes higher API rates for the 1,065 requests above 272,000 input tokens. The credits we received are outside this calculation. &lt;a href="https://developers.openai.com/api/docs/models/gpt-6.1-sol" rel="noopener noreferrer"&gt;Sol pricing&lt;/a&gt; · &lt;a href="https://developers.openai.com/api/docs/models/gpt-6.1-terra" rel="noopener noreferrer"&gt;Terra pricing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The 16 sessions span &lt;strong&gt;47h 24m&lt;/strong&gt; from first request to last recorded activity. At least one recorded agent turn was running for &lt;strong&gt;17h 22m&lt;/strong&gt;. Added across sessions, turns totaled &lt;strong&gt;27h 53m&lt;/strong&gt; because some ran in parallel. Turn durations include tool execution and waits.&lt;/p&gt;

&lt;p&gt;If I ran the same workflow again, I'd keep the integration worktree and decide its checks while writing the PRD. For Panas, one check is what happens when a provider finishes a job but the buyer disconnects before receiving the result. The reconnect has to retrieve the existing result and receipt. A duplicate run or a second charge would mean the pieces failed together, even if each branch passed its own tests.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>git</category>
      <category>hackathon</category>
    </item>
    <item>
      <title>Sharing Local MCP Tools Between Machines with MCPWire</title>
      <dc:creator>Carlos Rivera</dc:creator>
      <pubDate>Sun, 08 Nov 2026 06:30:24 +0000</pubDate>
      <link>https://dev.to/carlos/sharing-local-mcp-tools-between-machines-with-mcpwire-21j4</link>
      <guid>https://dev.to/carlos/sharing-local-mcp-tools-between-machines-with-mcpwire-21j4</guid>
      <description>&lt;p&gt;A teammate’s agent needs to use a tool that already works on your machine, but running it on theirs means installing the server, configuring credentials, and reproducing access to the systems behind it. If the tool depends on a local database, an internal network, or a browser session, copying its configuration may not be enough.&lt;/p&gt;

&lt;p&gt;I built &lt;a href="https://mcpwire.co/" rel="noopener noreferrer"&gt;MCPWire&lt;/a&gt; to share that existing execution environment through MCP, while keeping the server process and its configured credentials on the host. The guest runs a small bridge that looks like a local stdio MCP server to their client, and requests travel across a Noise-encrypted peer connection to your machine.&lt;/p&gt;

&lt;p&gt;The interesting part is where execution and authority end up, because keeping a credential on your laptop still lets someone else exercise some of its permissions through an allowed tool. The architecture has to make that delegation explicit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two bridges around an existing server
&lt;/h2&gt;

&lt;p&gt;MCPWire has two commands, &lt;code&gt;share&lt;/code&gt; on the host and &lt;code&gt;join&lt;/code&gt; on the guest, with the existing MCP server running as a child process on the host side. The client and server continue exchanging newline-delimited JSON-RPC through standard input and output.&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%2Fv3x56bqr8x66mo8ot78l.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%2Fv3x56bqr8x66mo8ot78l.png" alt="MCPWire request flow: a guest MCP client connects through a local join bridge and an encrypted Noise connection to the host's share process, which checks tool permissions and bridges to a separate MCP server process per peer." width="800" height="631"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the guest, &lt;code&gt;join&lt;/code&gt; connects the client’s stdin and stdout to the peer socket, while diagnostic messages go to stderr so they do not corrupt the protocol stream. It accepts one host connection per join process.&lt;/p&gt;

&lt;p&gt;On the host, &lt;code&gt;share&lt;/code&gt; inspects the traffic before forwarding it to the child process, rejecting disallowed tool calls and filtering the tool descriptors returned to the guest. The implementation is small enough to follow in &lt;a href="https://github.com/carlosrivera/mcpwire/blob/139b1e33f364b39bab4d64a108b052fc4afacabe/cli/src/join.ts" rel="noopener noreferrer"&gt;&lt;code&gt;join.ts&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/carlosrivera/mcpwire/blob/139b1e33f364b39bab4d64a108b052fc4afacabe/cli/src/share.ts" rel="noopener noreferrer"&gt;&lt;code&gt;share.ts&lt;/code&gt;&lt;/a&gt;, without introducing a separate application protocol around MCP.&lt;/p&gt;

&lt;p&gt;Each connected peer gets its own MCP child process, so two guests do not send their initialization messages into the same server process or share its in-memory session state. They can still reach the same files, database, and external services, and starting a separate process does not create an operating-system sandbox.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovery and the session ticket
&lt;/h2&gt;

&lt;p&gt;When the host starts sharing, it generates 32 random bytes and encodes them as a &lt;code&gt;wire://&lt;/code&gt; ticket, which both sides use as the discovery topic in Hyperswarm. The host announces on that topic, and the guest looks for a host using the same value.&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%2F1g2at2074a7f8lxjhthm.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%2F1g2at2074a7f8lxjhthm.png" alt="MCPWire discovery: the host announces a session topic on the Hyperswarm DHT, the guest looks up the topic from its private ticket, and the peers attempt to establish a Noise-encrypted connection for MCP traffic." width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The default discovery network is the public Hyperswarm DHT, with HyperDHT handling connection establishment and attempting UDP hole punching across NATs. MCPWire does not operate its own relay service, but the connection still depends on networking infrastructure and the behavior of the networks at both ends.&lt;/p&gt;

&lt;p&gt;That means a restrictive firewall or NAT configuration can prevent a connection, even when both developers have internet access and the ticket is correct. A peer connection reduces the infrastructure you need to deploy, while giving up the predictable reachability you might get from a publicly accessible hosted endpoint.&lt;/p&gt;

&lt;p&gt;The ticket identifies the discovery topic, and the Noise connection supplies encryption; the ticket itself is neither an encryption key nor an identity certificate for your teammate. MCPWire does not bind it to a named user, so it must be handled as an access credential and delivered through a trusted channel.&lt;/p&gt;

&lt;p&gt;A ticket remains reusable while its host session is running, and starting a new host session generates a new one, rather than maintaining a permanent address for that server. Custom DHT bootstrap nodes are configurable through &lt;code&gt;MCPWIRE_BOOTSTRAP&lt;/code&gt;, as shown in the &lt;a href="https://github.com/carlosrivera/mcpwire/blob/139b1e33f364b39bab4d64a108b052fc4afacabe/cli/src/dht.ts" rel="noopener noreferrer"&gt;network setup code&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Following a tool call through the host
&lt;/h2&gt;

&lt;p&gt;Suppose you expose a filesystem server with &lt;code&gt;read_file&lt;/code&gt; and &lt;code&gt;list_directory&lt;/code&gt; allowed, and the guest asks their agent to inspect a file in the shared directory. The agent first discovers the server’s tools, then sends a &lt;code&gt;tools/call&lt;/code&gt; request through its local MCP client.&lt;/p&gt;

&lt;p&gt;When the server returns its tool descriptors, MCPWire filters the list using the host’s policy, so the guest sees the tools selected for that session. When an actual call arrives, MCPWire checks the requested tool name again before writing the request to the server’s stdin.&lt;/p&gt;

&lt;p&gt;Both checks matter, because hiding &lt;code&gt;write_file&lt;/code&gt; from the advertised list does not stop a client from sending a request with that name anyway. The execution check is what prevents a disallowed call from reaching the child process.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/carlosrivera/mcpwire/blob/139b1e33f364b39bab4d64a108b052fc4afacabe/cli/src/firewall.ts" rel="noopener noreferrer"&gt;policy implementation&lt;/a&gt; gives an explicit deny precedence over an allow, and an omitted allowlist permits every tool that has not been denied. An empty allowlist permits no tools.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;--confirm&lt;/code&gt;, an allowed call also requires approval in the host terminal, where the operator can reject it, approve it once, or approve that tool for the rest of the session. That last choice is shared session policy, so it should not be interpreted as approval limited to one guest connection.&lt;/p&gt;

&lt;h2&gt;
  
  
  The boundary of a tool permission
&lt;/h2&gt;

&lt;p&gt;Allowing &lt;code&gt;read_file&lt;/code&gt; controls which operation can be requested, but the filesystem server still decides which paths are valid and which files its process can read. Similarly, allowing a SQL tool says nothing about whether the submitted query can modify data, unless the server or database enforces that restriction.&lt;/p&gt;

&lt;p&gt;The current policy checks tool names, without validating their arguments, filtering MCP resources or prompts, or restricting the child process’s access to the host. Credentials with limited permissions and a narrowly configured server remain necessary, even when the session exposes only one tool.&lt;/p&gt;

&lt;p&gt;This also explains the difference between keeping credentials local and keeping data local, because a tool can use a local credential to retrieve information that it then returns to the guest. MCPWire avoids requiring the guest to configure that credential, but the permitted responses still cross the connection and enter the guest’s MCP client.&lt;/p&gt;

&lt;p&gt;Optional &lt;code&gt;--redact-secrets&lt;/code&gt; processing scans outbound messages for recognized patterns before sending them, replacing matches with &lt;code&gt;[REDACTED_BY_MCPWIRE]&lt;/code&gt;. Pattern matching can miss a private value or change legitimate output, so it adds a check on responses without establishing that everything leaving the machine is safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  Session limits and failure semantics
&lt;/h2&gt;

&lt;p&gt;The host can set a time limit with &lt;code&gt;--ttl&lt;/code&gt; and a forwarded tool-call budget with &lt;code&gt;--max-calls&lt;/code&gt;, with the call counter shared across the session’s peers. Neither limit is enabled by default, and redaction and manual approval also require explicit flags.&lt;/p&gt;

&lt;p&gt;On a peer disconnect, the host requests termination of that peer’s child process, but terminating a process cannot reverse an operation already committed to a database or external service. A tool that completed a write just before the connection failed may leave the guest without its response.&lt;/p&gt;

&lt;p&gt;MCPWire does not automatically replay calls after a disconnect, because resending a request could execute that write a second time while making the failure look recovered. The application needs an operation identifier, a way to inspect the result, or another recovery mechanism before a retry can be considered safe.&lt;/p&gt;

&lt;p&gt;The optional session recorder stores local events and response metadata, including timing and success or error status, rather than full response bodies. Its records also include the ticket, server command, and unredacted argument previews, so a recording can itself contain sensitive information even when response redaction is enabled.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small filesystem example
&lt;/h2&gt;

&lt;p&gt;For a first test, use a dedicated directory with disposable data, then expose only the read and directory-listing tools for a session lasting 30 minutes. The CLI requires Node.js 18 or newer, while the pinned filesystem server below requires Node.js 24 or newer on the host.&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="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/mcpwire-demo"&lt;/span&gt;
&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'Hello from the host.\n'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/mcpwire-demo/hello.txt"&lt;/span&gt;

npx &lt;span class="nt"&gt;-y&lt;/span&gt; @mcpwire/cli share &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; shared-files &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--allow&lt;/span&gt; &lt;span class="s2"&gt;"read_file,list_directory"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--redact-secrets&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--ttl&lt;/span&gt; 30m &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--&lt;/span&gt; npx &lt;span class="nt"&gt;-y&lt;/span&gt; @modelcontextprotocol/server-filesystem@2.0.1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/mcpwire-demo"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The host prints a client configuration containing its session ticket, which the guest adds to a client that supports stdio MCP servers. A configuration using the &lt;code&gt;mcpServers&lt;/code&gt; convention has this shape, with the placeholder replaced by the full ticket from the host:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"shared-files"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"@mcpwire/cli"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"join"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"wire://PASTE_THE_FULL_TICKET_FROM_THE_HOST"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Give the guest the absolute path to &lt;code&gt;hello.txt&lt;/code&gt; on the host, then ask their agent to read it and check that the returned text matches the file. A useful second check is a direct &lt;code&gt;write_file&lt;/code&gt; request, which should be rejected by MCPWire even though the underlying filesystem server implements it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this architecture fits
&lt;/h2&gt;

&lt;p&gt;For temporary collaboration, this arrangement lets a teammate use an existing local environment without reproducing its dependencies or moving the server to a hosted service. For a persistent team endpoint, requirements such as named-user authentication, centralized policy, and reliable reachability may justify a different deployment model.&lt;/p&gt;

&lt;p&gt;The design keeps execution on the host and puts selected controls in front of it, while leaving argument validation, data permissions, and recovery from ambiguous execution to the systems that own those decisions. A remote agent can only be constrained as precisely as those underlying boundaries allow.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>opensource</category>
      <category>architecture</category>
    </item>
    <item>
      <title>How I Built In-Game Hot Reloading with an LLM Chat (Zero Build Steps, Pure ESM)</title>
      <dc:creator>Carlos Rivera</dc:creator>
      <pubDate>Wed, 02 Sep 2026 22:00:01 +0000</pubDate>
      <link>https://dev.to/carlos/how-i-built-in-game-hot-reloading-with-an-llm-chat-zero-build-steps-pure-esm-2a2h</link>
      <guid>https://dev.to/carlos/how-i-built-in-game-hot-reloading-with-an-llm-chat-zero-build-steps-pure-esm-2a2h</guid>
      <description>&lt;p&gt;Imagine playing a 3D WebGL game in your browser, hitting an &lt;strong&gt;EDIT&lt;/strong&gt; button, typing &lt;em&gt;"make the camera lower and double the player's thrust"&lt;/em&gt;, and watching the running game smoothly update in real time — without a page refresh, without a bundler, and without writing a single line to disk until you're ready to commit.&lt;/p&gt;

&lt;p&gt;Here is a look under the hood at how we built an in-browser AI game development loop using &lt;strong&gt;Native ES Modules&lt;/strong&gt;, &lt;strong&gt;Blob URL graph rewriting&lt;/strong&gt;, &lt;strong&gt;IndexedDB virtual overlays&lt;/strong&gt;, and &lt;strong&gt;client-side LLM tool execution&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 The Three Hard Problems
&lt;/h2&gt;

&lt;p&gt;Building an AI-assisted live editing loop inside a browser game sounds straightforward until you hit the browser's lower-level constraints:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Native ES Module Caching:&lt;/strong&gt; Modern browsers permanently cache ESM imports by resolved URL. Adding cache-busting queries (&lt;code&gt;./main.js?v=2&lt;/code&gt;) only updates the entry point; its nested imports (&lt;code&gt;./physics.js&lt;/code&gt;, &lt;code&gt;./camera.js&lt;/code&gt;) still resolve to stale, cached modules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WebGL Context Exhaustion:&lt;/strong&gt; Browsers strictly cap WebGL contexts (often 8–16 max). If your hot reload recreates the renderer on every edit, your tab crashes after a few prompts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Window &amp;amp; Disk Pollution:&lt;/strong&gt; Sending a whole 70KB codebase on every LLM prompt costs a fortune in tokens. Conversely, letting an LLM blindly overwrite files on disk turns your &lt;code&gt;git status&lt;/code&gt; into chaos whenever the model hallucinates.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🏗️ The Architecture Overview
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ┌─────────────────────────────────────────────────────────────┐
 │                      BROWSER CLIENT                         │
 │                                                             │
 │   1. User Prompt: "increase boost speed"                    │
 │   2. Client posts history to /api/agent                     │
 │   3. Model returns toolCalls: read_file -&amp;gt; patch_file       │
 │   4. Client executes tools against IndexedDB overrides      │
 │   5. Client calls reload():                                 │
 │        ├── Calls previousInstance.getState()                │
 │        ├── Calls previousInstance.dispose() (frees GPU)     │
 │        ├── Rewrites module imports -&amp;gt; Blob URLs             │
 │        └── Calls nextInstance.init({ renderer, state })     │
 └──────────────────────────────▲──────────────────────────────┘
                                │ HTTP Tool Loop
 ┌──────────────────────────────▼──────────────────────────────┐
 │                      DENO / HONO BACKEND                    │
 │                                                             │
 │   - Holds OpenRouter API Key (never leaked to browser)      │
 │   - Proxies generateText() with Vercel AI SDK               │
 │   - Declarative tools without execute() (Client runs them)  │
 └─────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  1. Dynamic ESM Graph Rewriting with Blob URLs
&lt;/h2&gt;

&lt;p&gt;When you ask the AI to change code, the updated file exists only in memory. How do you import a module graph containing in-memory code where dependencies point to each other instead of disk?&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;shared/engine/loader.js&lt;/code&gt;, we walk the relative dependency tree depth-first and synthesize &lt;code&gt;Blob&lt;/code&gt; URLs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// loader.js (simplified)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SPECIFIER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;(\b&lt;/span&gt;&lt;span class="sr"&gt;from&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;*|&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;import&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;)([&lt;/span&gt;&lt;span class="sr"&gt;'"&lt;/span&gt;&lt;span class="se"&gt;])([^&lt;/span&gt;&lt;span class="sr"&gt;'"&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;)\2&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isRelative&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;buildModuleGraph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entryUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;overrides&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;built&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// resolved url -&amp;gt; blob url&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;resolved&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;built&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;built&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// 1. Grab in-memory override or fetch from disk&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;pathname&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;overrides&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="nx"&gt;overrides&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="k"&gt;await &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="c1"&gt;// 2. Recursively resolve relative dependencies first (depth-first)&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;deps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[,&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SPECIFIER&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;isRelative&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;deps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;deps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// 3. Rewrite relative import paths to their dependency's Blob URL&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rewritten&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SPECIFIER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;match&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;kw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;quote&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="nx"&gt;deps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;kw&lt;/span&gt;&lt;span class="p"&gt;}${&lt;/span&gt;&lt;span class="nx"&gt;quote&lt;/span&gt;&lt;span class="p"&gt;}${&lt;/span&gt;&lt;span class="nx"&gt;deps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;)}${&lt;/span&gt;&lt;span class="nx"&gt;quote&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;match&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// 4. Create an ephemeral Blob URL for this module&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;blobUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createObjectURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;rewritten&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text/javascript&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;
    &lt;span class="nx"&gt;built&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;blobUrl&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;blobUrl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entryUrl&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;built&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why this is magic:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bare specifiers&lt;/strong&gt; like &lt;code&gt;import * as THREE from 'three'&lt;/code&gt; or &lt;code&gt;import '#engine/loop.js'&lt;/code&gt; are left untouched, continuing to resolve cleanly through the native HTML &lt;code&gt;&amp;lt;script type="importmap"&amp;gt;&lt;/code&gt;. Third-party vendor libraries are cached and shared.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blob URLs are revoked&lt;/strong&gt; immediately after &lt;code&gt;import(/* @vite-ignore */ url)&lt;/code&gt; completes, preventing memory leaks across dozens of reloads.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Browser-Side Tool Execution (Inverting the Agent Loop)
&lt;/h2&gt;

&lt;p&gt;Typically, AI coding tools run on a server that modifies local files. Here, we inverted that: &lt;strong&gt;the browser executes the tools&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Why? Because the &lt;em&gt;authoritative source of truth&lt;/em&gt; during a live session is the browser's &lt;code&gt;IndexedDB&lt;/code&gt;, not disk. If the server tried to read the file, it would read a stale version.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;server/src/tools.ts&lt;/code&gt;, the backend tools have &lt;strong&gt;no server execution code&lt;/strong&gt; (&lt;code&gt;execute&lt;/code&gt;). They simply declare schemas to the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// server/src/tools.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;TOOLS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;list_files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;read_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;jsonSchema&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;patch_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;jsonSchema&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;search&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;reload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;     &lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hot-swap the game with current edits.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the model returns tool calls, the browser (&lt;code&gt;shared/engine/chat.js&lt;/code&gt;) runs them against its virtual storage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// shared/engine/chat.js (inside browser)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;patch_file&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;search&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;replace&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;currentSources&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

    &lt;span class="c1"&gt;// Strict match validation: prevent silent hallucinations&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;search&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hits&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`search text not found in &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;. Copy exact text.`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hits&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`search text matches &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;hits&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; times; include more surrounding lines.`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;saveEdit&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;search&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="na"&gt;game&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;gameId&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`patched &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;reload&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;game&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reload&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;overrides&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;overridesFor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gameId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;reload ok — the game is running your changes.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`reload FAILED: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;\nThe game is broken. Read the file and fix it.`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using surgical text replacement via &lt;code&gt;patch_file&lt;/code&gt; instead of rewriting entire modules drops input/output token usage by &lt;strong&gt;~90%&lt;/strong&gt;. A tweak that used to cost $0.05 now costs ~$0.005 on fast models like GLM 5.3 Flash or Gemini 2.5 Flash.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Preserving WebGL Context &amp;amp; State Across Swaps
&lt;/h2&gt;

&lt;p&gt;To swap game logic without blowing up Three.js or resetting player position, we enforce an explicit lifecycle contract:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Game Module Contract&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;init&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ctx: { renderer, canvas, state }&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;elapsed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* frame logic */&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nf"&gt;dispose&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// Must free Three.js geometries, textures, and event listeners!&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nf"&gt;getState&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// Optional: snapshot position, seed, score to carry into the next reload&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;seed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;world&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;seed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;playerPos&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toArray&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The host (&lt;code&gt;shared/engine/host.js&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Keeps &lt;strong&gt;one single &lt;code&gt;WebGLRenderer&lt;/code&gt;&lt;/strong&gt; for the lifetime of the page.&lt;/li&gt;
&lt;li&gt;Calls &lt;code&gt;instance.getState()&lt;/code&gt; to grab state before teardown.&lt;/li&gt;
&lt;li&gt;Calls &lt;code&gt;instance.dispose()&lt;/code&gt; to deallocate GPU buffers and remove listeners.&lt;/li&gt;
&lt;li&gt;Dynamically imports the new Blob URL module graph.&lt;/li&gt;
&lt;li&gt;Invokes &lt;code&gt;init({ renderer, canvas, state: carriedState })&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The procedural world rebuilds in milliseconds right where you left off.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Virtual Sandboxing: Zero Disk Pollution
&lt;/h2&gt;

&lt;p&gt;Edits are stored in &lt;strong&gt;IndexedDB&lt;/strong&gt; (&lt;code&gt;arcade-vault/edits&lt;/code&gt;).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;REVERT:&lt;/strong&gt; Discards IndexedDB records and reloads the original files from disk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EXPORT:&lt;/strong&gt; When you're happy with what the AI built, clicking &lt;strong&gt;EXPORT&lt;/strong&gt; compiles the edits into a shell heredoc snippet copied straight to your clipboard:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; games/gravpulse/src/camera.js &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;VAULT_EOF&lt;/span&gt;&lt;span class="sh"&gt;'
// ... your updated code ...
&lt;/span&gt;&lt;span class="no"&gt;VAULT_EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You paste it into your terminal, test it, and commit with &lt;code&gt;git&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Key Takeaways
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;You don't always need a bundler:&lt;/strong&gt; Native ES Modules combined with &lt;code&gt;URL.createObjectURL&lt;/code&gt; allow rich in-browser code evaluation and module linking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Move tool execution to the client&lt;/strong&gt; when the browser holds the state, keeping the backend a lightweight, stateless token proxy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Targeted patching beats full rewrites&lt;/strong&gt; for agentic editing loops — it's faster, cheaper, and resilient against hallucinated code truncations.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Check out the open-source implementation and playable games on GitHub!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>gamedev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>I Built an AI Game Arcade with Vanilla JavaScript and Zero Build Steps</title>
      <dc:creator>Carlos Rivera</dc:creator>
      <pubDate>Thu, 27 Aug 2026 19:30:41 +0000</pubDate>
      <link>https://dev.to/carlos/i-built-an-ai-game-arcade-with-vanilla-javascript-and-zero-build-steps-208k</link>
      <guid>https://dev.to/carlos/i-built-an-ai-game-arcade-with-vanilla-javascript-and-zero-build-steps-208k</guid>
      <description>&lt;p&gt;GLM 5.3 Flash is out, so I wanted to test it by building something practical instead of another isolated code sample.&lt;/p&gt;

&lt;p&gt;I made an arcade.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://carlosrivera.github.io/arcade-vault/" rel="noopener noreferrer"&gt;Arcade Vault&lt;/a&gt; is a small collection of playable browser games generated and developed as experiments with affordable AI models.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first two cartridges
&lt;/h2&gt;

&lt;h3&gt;
  
  
  GRAVPULSE 2097
&lt;/h3&gt;

&lt;p&gt;A 3D anti-gravity racer set on neon city circuits.&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%2Fc0xgbazb8xs1anz1y2ek.jpg" 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%2Fc0xgbazb8xs1anz1y2ek.jpg" alt="GRAVPULSE 2097 gameplay" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://carlosrivera.github.io/arcade-vault/games/gravpulse/" rel="noopener noreferrer"&gt;Play GRAVPULSE 2097&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  DUNESWEEPER
&lt;/h3&gt;

&lt;p&gt;A procedural voxel archaeological minesweeper game where you excavate ruins, avoid traps, and search for relics.&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%2Fbhf67klicfius78wbdha.jpg" 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%2Fbhf67klicfius78wbdha.jpg" alt="DUNESWEEPER gameplay" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://carlosrivera.github.io/arcade-vault/games/dunesweeper/" rel="noopener noreferrer"&gt;Play DUNESWEEPER&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why vanilla JavaScript?
&lt;/h2&gt;

&lt;p&gt;I deliberately kept the project simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No build step&lt;/li&gt;
&lt;li&gt;Native ES modules&lt;/li&gt;
&lt;li&gt;HTML, CSS, and JavaScript&lt;/li&gt;
&lt;li&gt;Minimal dependencies&lt;/li&gt;
&lt;li&gt;Shared libraries stored in the repository&lt;/li&gt;
&lt;li&gt;Static hosting through GitHub Pages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal was to make every game immediately inspectable and playable. Clone the repository, open a static server, and the project runs.&lt;/p&gt;

&lt;p&gt;There is no compilation pipeline between an idea and a playable experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  The architecture
&lt;/h2&gt;

&lt;p&gt;The arcade has a small registry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gravpulse"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"GRAVPULSE 2097"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"games/gravpulse/index.html"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main page loads games.json, creates a cartridge card, and points it to the corresponding game directory.&lt;br&gt;
Each game is self-contained:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;games/
├── gravpulse/
│   ├── index.html
│   └── src/
└── dunesweeper/
    ├── index.html
    └── src/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shared utilities live outside the game folders, including the common “eject” button that returns players to the arcade.&lt;/p&gt;

&lt;p&gt;This structure is intentionally boring. That is a feature.&lt;/p&gt;

&lt;h3&gt;
  
  
  The longer-term idea
&lt;/h3&gt;

&lt;p&gt;Eventually, I would love to add a chatbox directly to the arcade. The experience I have in mind is something like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Create a small underwater game where I control a submarine and collect lost treasure.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The chatbox would generate a new game module, add it to the registry, and make it playable directly in the browser.&lt;/p&gt;

&lt;p&gt;Keeping the project build-free and dependency-light should make that kind of workflow easier to reason about. The generated output could remain close to the source instead of disappearing behind a large toolchain.&lt;/p&gt;

&lt;h3&gt;
  
  
  More cartridges are coming
&lt;/h3&gt;

&lt;p&gt;I will probably keep adding games as new affordable models arrive.&lt;/p&gt;

&lt;p&gt;Each model becomes another creative and technical test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What kinds of game loops can it create?&lt;/li&gt;
&lt;li&gt;How well does it handle state and input?&lt;/li&gt;
&lt;li&gt;Can it produce maintainable browser code?&lt;/li&gt;
&lt;li&gt;How much can be generated before human refinement becomes necessary?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For now, the arcade is small, but the foundation is there.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://carlosrivera.github.io/arcade-vault/" rel="noopener noreferrer"&gt;Visit Arcade Vault&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/carlosrivera/arcade-vault" rel="noopener noreferrer"&gt;View the source on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you try either game, I would love to hear what breaks, what feels fun, and what should become the next cartridge.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
