AI Weekly Malaysia

Back to items Summaries

WorldTUI: I trained a 360M model to pretend to be a terminal

ID
38683
Status
summarized
Published
22 Oct 2026, 10:18 AM
Fetched
23 Oct 2026, 4:59 PM
Provider
Hacker News
Category
dev-community
Original URL
https://simedw.com/2026/10/21/world-model-terminal/
Source URL
https://hnrss.org/best

Summary

Score
7.8
Created
23 Oct 2026, 5:01 PM
Tags
Audience
developersai_ml_learnersai_agent_usersvibe_coders

What happened

Simon Edwardsson fine-tuned a 360M-parameter model (based on Qwen2.5-Coder-0.5B) to act as a terminal with no shell or filesystem behind it: each keypress goes in and the model predicts the resulting screen change. Training data came from real terminal sessions recorded from programs running inside Docker, and the model predicts a character grid rather than an appended token stream — screen size is an input, so sessions can start mid-vim or mid-snake. The two biggest technical wins he cites are teaching the model to repair its own mistakes and decoding screen rows in parallel; the 208 MB demo runs in-browser via WebGPU and the typo 'pythoon' is the intended tell that it isn't a real shell.

Why it matters

The transferable idea isn't the demo, it's the interface: predicting diffs on a fixed character grid with variable dimensions, plus parallel row decoding, is a concrete pattern for anyone building agent tooling or TUI automation where a real shell is slow, unsafe, or unavailable. It also sets a clear expectation bar — the model 'usually remembers what you wrote a few commands later' and continues better from a bash prompt than from vim or snake, so don't plan to swap a deterministic PTY for a learned one in any workflow where exact output matters. Read the write-up for the session-encoding format (SCREEN_START / ROW_n / CURSOR tokens) before assuming this is just a parlor trick.

Discussion angle

If a 360M model can fake vim and tmux convincingly enough to be fun, where is the line for agent sandboxes — would you ever let an agent 'run' commands against a predicted screen instead of a real shell, and what breaks first (exact output, state drift, or error recovery)?

Top