<?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: wilsen_deng</title>
    <description>The latest articles on DEV Community by wilsen_deng (@wilsen0).</description>
    <link>https://dev.to/wilsen0</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%2F4115865%2F8fd9008b-6e31-4bf6-984e-9d1aeab825d5.jpg</url>
      <title>DEV Community: wilsen_deng</title>
      <link>https://dev.to/wilsen0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wilsen0"/>
    <language>en</language>
    <item>
      <title>Why We Built a Rust Terminal Engine to Babysit Claude Code and Codex on Mobile</title>
      <dc:creator>wilsen_deng</dc:creator>
      <pubDate>Tue, 08 Sep 2026 13:47:07 +0000</pubDate>
      <link>https://dev.to/wilsen0/why-we-built-a-rust-terminal-engine-to-babysit-claude-code-and-codex-on-mobile-5c7l</link>
      <guid>https://dev.to/wilsen0/why-we-built-a-rust-terminal-engine-to-babysit-claude-code-and-codex-on-mobile-5c7l</guid>
      <description>&lt;p&gt;Like many developers riding the wave of "vibe-coding", our daily workflow shifted dramatically over the past year. We went from writing code line by line to directing autonomous CLI agents — &lt;strong&gt;Claude Code, OpenAI Codex, OpenCode, Aider, and custom harnesses&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These agents usually run on beefy remote machines: an M-series Mac Studio under the desk, a high-core Linux homelab box, or a cloud dev instance.&lt;/p&gt;

&lt;p&gt;And that created an unexpected new bottleneck: &lt;strong&gt;Babysitting.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You give Claude a task: &lt;em&gt;"Refactor the auth middleware to support WebAuthn, update the integration test suite, and verify all 48 test suites pass."&lt;/em&gt;&lt;br&gt;
Then Claude gets to work. It takes 15 minutes. It reads 30 files. It runs cargo test.&lt;/p&gt;

&lt;p&gt;Do you sit at your desk staring at the cursor for 15 minutes? Of course not. You get up, walk the dog, grab a coffee, or step onto the subway.&lt;/p&gt;

&lt;p&gt;And that’s where the mobile experience completely falls apart.&lt;/p&gt;


&lt;h3&gt;
  
  
  The Three Silent Killers of Mobile Agent Monitoring
&lt;/h3&gt;

&lt;p&gt;We tried using standard mobile SSH apps. Within 48 hours, the frustrations were unbearable:&lt;/p&gt;
&lt;h4&gt;
  
  
  1. The Fragile TCP Socket Trap
&lt;/h4&gt;

&lt;p&gt;Standard SSH relies on persistent TCP connections. The moment your phone locks, goes to sleep, switches from Wi-Fi to cellular, or hits an elevator: &lt;strong&gt;Connection dropped.&lt;/strong&gt; Your active session disappears.&lt;/p&gt;
&lt;h4&gt;
  
  
  2. The Touch-Typing Nightmare
&lt;/h4&gt;

&lt;p&gt;When you unlock your phone, reconnect, and want to resume where you left off, you have to type on a terrible glass virtual keyboard:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude &lt;span class="nt"&gt;--resume&lt;/span&gt; 7f8a9b-c891-4d32-bb91-0123456789ab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finding that session ID from history on a 6-inch screen is painful. Doing it three times a day makes you want to throw your phone out the window.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. The Webview Thermal Meltdown
&lt;/h4&gt;

&lt;p&gt;When Claude runs a test suite and dumps a 10MB compiler error log or diff into stdout, traditional mobile terminals (often running JavaScript/xterm.js inside an embedded Webview or Flutter canvas) completely choke. The UI freezes for 8 seconds, the phone turns into a pocket warmer, and 15% of your battery vanishes in minutes.&lt;/p&gt;




&lt;h3&gt;
  
  
  Engineering Moku: A Different Approach
&lt;/h3&gt;

&lt;p&gt;We realized we didn't just need "another SSH client". We needed a &lt;strong&gt;dedicated cockpit for the Vibe-Coding era&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So we built &lt;strong&gt;Moku&lt;/strong&gt; (&lt;a href="https://portholelab.com/moku/" rel="noopener noreferrer"&gt;portholelab.com/moku&lt;/a&gt;). Here is how we tackled the engineering challenges:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Agentless Workspace Auto-Discovery
&lt;/h4&gt;

&lt;p&gt;Instead of asking users to install yet another proprietary daemon, background agent, or cloud proxy on their servers, we looked at how modern CLI agents work.&lt;/p&gt;

&lt;p&gt;Claude Code, OpenAI Codex, OpenCode, Qoder, Kimi, and Grok CLI all leave structured traces on the host machine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQLite databases in &lt;code&gt;~/.claude/projects/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;JSON/JSONL session logs in &lt;code&gt;~/.codex/sessions/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Standard project root descriptors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Over a single, standard SSH channel, Moku scans these directories, discovers all active and past sessions across your projects, and displays them as visual interactive cards. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tap a card → Moku re-enters the exact session context in an interactive terminal. Zero typing.&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Why We Replaced the Terminal Engine with Rust
&lt;/h4&gt;

&lt;p&gt;To eliminate the lag when agents vomit massive logs, we stripped out the legacy Flutter/Dart terminal parser and rewrote the entire terminal core in Rust:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Custom ANSI State Machine&lt;/strong&gt;: Direct byte-stream parsing compiled to native ARM64/x86 assembly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;packedRowsV2&lt;/code&gt; Zero-Copy Surface&lt;/strong&gt;: A compact memory layout that transmits bounded render diffs to the Flutter UI layer rather than re-rendering millions of offscreen cells.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sub-Millisecond Scrollback&lt;/strong&gt;: Pruning up to 813 million lines/sec with zero stutter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are the real benchmark numbers from our test harness:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Workload&lt;/th&gt;
&lt;th&gt;Custom Rust Core&lt;/th&gt;
&lt;th&gt;Flutter AOT Baseline&lt;/th&gt;
&lt;th&gt;Speedup&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ANSI Parser Throughput&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;28.07 MB/s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;13.39 MB/s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.10×&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;10 MiB Burst Output&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;34.96 MB/s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;11.21 MB/s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.12×&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scrollback Append&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;408.79k lines/s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;171.09k lines/s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.39×&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scrollback Trim&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;813.59M lines/s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;70.53M lines/s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;11.54×&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A 10MB trace that used to lock up the app now flashes past in ~0.3 seconds.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Native Mosh Roaming + Built-in WireGuard (Tailcat)
&lt;/h4&gt;

&lt;p&gt;To kill the connection-drop problem:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We embedded native &lt;strong&gt;Mosh (Mobile Shell)&lt;/strong&gt; UDP synchronization directly into the client. Walk out of your home Wi-Fi into 5G? Step into an elevator? Your terminal session stays alive and seamless.&lt;/li&gt;
&lt;li&gt;No public IP on your remote machine? We integrated &lt;strong&gt;Tailcat&lt;/strong&gt;, an in-app userspace WireGuard mesh transport. Run &lt;code&gt;tailcat --serve=22&lt;/code&gt; on your devbox, paste the token into Moku, and connect peer-to-peer with zero port forwarding and zero root privileges.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  4. Live Activity, Dynamic Island &amp;amp; Soot (煤球)
&lt;/h4&gt;

&lt;p&gt;You shouldn't even have to open the app to know if your agent is done:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We wired terminal OSC/ANSI escape notifications directly into iOS &lt;strong&gt;Live Activities &amp;amp; Dynamic Island&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Glance at your phone: see if Claude is &lt;code&gt;Thinking...&lt;/code&gt;, &lt;code&gt;Blocked on input&lt;/code&gt;, or &lt;code&gt;Completed&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;And living on the terminal perch is &lt;strong&gt;Soot (煤球)&lt;/strong&gt; — a param-driven pixel mascot that watches over your build, reacts when tests pass, and keeps you company during late-night deploys.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Privacy by Construction: 100% Local-First
&lt;/h3&gt;

&lt;p&gt;We don't want your keys, and we don't want your data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero Cloud Middlemen&lt;/strong&gt;: Your SSH keys and host configurations are stored exclusively on your device using OS-level secure enclaves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Direct P2P&lt;/strong&gt;: Connections go straight from your phone to your host. No telemetry on your shell streams.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  The 10,000 Stars Open-Source Pledge 🌟
&lt;/h3&gt;

&lt;p&gt;Moku is currently free to download and use. But our goal is bigger:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We have pledged on our GitHub repository to fully open-source the entire client and Rust terminal engine once we hit 10,000 GitHub Stars!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're building with Claude Code, Codex, or remote agents, we would love for you to try it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📲 &lt;strong&gt;iOS (Public TestFlight Beta)&lt;/strong&gt;: &lt;a href="https://testflight.apple.com/join/w7CFhrRT" rel="noopener noreferrer"&gt;testflight.apple.com/join/w7CFhrRT&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🤖 &lt;strong&gt;Android (Direct APKs)&lt;/strong&gt;: &lt;a href="https://github.com/wilsen0/moku/releases" rel="noopener noreferrer"&gt;github.com/wilsen0/moku/releases&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;⭐ &lt;strong&gt;Star us on GitHub&lt;/strong&gt;: &lt;a href="https://github.com/wilsen0/moku" rel="noopener noreferrer"&gt;github.com/wilsen0/moku&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🚀 &lt;strong&gt;Product Hunt Launch Day&lt;/strong&gt;: &lt;a href="https://www.producthunt.com/products/moku" rel="noopener noreferrer"&gt;producthunt.com/products/moku&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Official Site&lt;/strong&gt;: &lt;a href="https://portholelab.com/moku/" rel="noopener noreferrer"&gt;portholelab.com/moku&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What CLI agents are you currently using in your day-to-day work? We'd love to hear your thoughts and feedback below!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>rust</category>
      <category>productivity</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
