HotCopy RLM Demo
RLM architecture walkthrough โ parallel agent swarms.
Recursive Language Models
HotCopy is a Recursive Language Model CLI on Cloudflare Workers. Unbounded context, agent swarms in parallel, two-tier orchestrator/worker architecture (256K context per agent), no API keys, no config.
Your codebase is too big for any context window. So we killed the context window. Managed recursive AI coding CLI โ agent swarms decompose impossible problems in parallel.
Managed recursive AI coding CLI. Agent swarms decompose impossible problems in parallel. No context limits. No API keys. No config. Just install and go. HotCopy treats your project as an environment the model interacts with programmatically โ never raw files in a prompt.
HotCopy implements the Recursive Language Model (RLM) paradigm introduced by Zhang, Kraska, and Khattab at MIT CSAIL (arXiv:2512.24601, Jan 2026). Existing scaffolds (Claude Code, Gemini CLI, Cursor) place the user prompt directly into the LLM's context window, generate output autoregressively (capped by token limits), and verbalize sub-LLM calls (only O(1) delegations). RLMs invert this: the prompt is loaded as a REPL variable, the model writes code to interrogate it, sub-calls are programmatic functions inside that code, and the answer is built up in variables and returned via FINAL_VAR() โ unbounded by any single model's generation length.
| Benchmark | Input Size | Base GPT-5 | RLM(GPT-5) | Avg Cost |
|---|---|---|---|---|
| BrowseComp+ | 6โ11M tokens | 0% | 91.3% | $0.99 |
| OOLONG | 131K tokens | 44% | 56.5% | $0.43 |
| OOLONG-Pairs | 32K tokens | 0.04% | 58.0% | $0.33 |
| CodeQA | 23Kโ4.2M tokens | 24% | 62% | $0.11 |
Median RLM cost โค base model cost; up to 3ร cheaper than summary-agent baselines. Source: Zhang, Kraska, Khattab. Recursive Language Models. MIT CSAIL. arXiv:2512.24601, Jan 2026.
@cloudflare/codemode). Stdout is truncated before being appended to history โ variables hold the long state, the model history holds the metadata.llm_batch(). Unlike the paper's sequential implementation, HotCopy fans out scouts in parallel through Cloudflare Workers, dramatically reducing latency on map-reduce decompositions.hotcopy-gateway for cost tracking, prefix caching (per-session affinity), and rate-limit handling. State lives in DO SQL โ trajectories, sub-calls, costs, all logged for debugging.FINAL_VAR() for unbounded output. The model returns the name of the variable holding the answer. The reply is whatever that variable holds โ no autoregressive output cap.| Category | Functions |
|---|---|
| Context | context.read(path), context.readAll(paths), context.search(pattern), context.preview(chars), context.metadata, context.files |
| Sub-calls | llm_query(prompt), llm_batch(prompts) |
| Agents | spawn_worker(role, task, ctx), vision_analyze(base64, prompt) |
| Memory | memory_search(query, limit), memory_failures(query), memory_save(type, content) |
| File tools | write_file(path, content), edit_file(path, old, new), shell(cmd, cwd) |
| Verification | verify(claim, evidence), verify_claims(...) |
| Persistent state | set_context(label, content), load_context(label) |
| Terminal | FINAL(text), FINAL_VAR(varName), print(...) |
SWARM_STATE.md task manifest, continuously updated by the orchestrator. Exploits transformer recency bias by placing the live task list at the end of context.Default-deny on fetch_*, browse, crawl, shell. Wildcard rules in D1 (permission_rules) let users selectively allow patterns (api.github.com/*, git status, etc.) at three persistence tiers โ session, user, or global. Every quarantined call hits a tier-cascade evaluator; first match wins; "ask" rules round-trip to the CLI for a per-call decision.
Cloudflare Workers + Agents SDK ยท Durable Objects (RLMOrchestrator, WorkerAgent, VisionAgent, MemoryAgent) ยท D1 ยท Vectorize ยท R2 ยท Dynamic Workers (@cloudflare/codemode) ยท AI Gateway (hotcopy-gateway).
npm i -g hotcopy && hotcopy
Sign in on first run. No API keys. No config files. Managed inference is included.
Contact: hello@hotcopy.ai ยท hotcopy.ai