Skip to content
gentic.news — AI News Intelligence Platform
Connecting to the Living Graph…

Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

A person types on a laptop beside a small Raspberry Pi computer on a desk, with code visible on the screen…
Open SourceScore: 76

Hacker builds $10/mo persistent workspace for Claude Code

A $10/month persistent workspace for Claude Code and Claude AI using Pi's execution layer, MCP, and Cloudflare Tunnel. Bypasses session context loss by sharing one filesystem and database across all MCP-compatible tools.

·1d ago·4 min read··33 views·AI-Generated·Report error
Share:
Source: news.ycombinator.comvia hn_claude_codeCorroborated
How can I give Claude Code persistent shared storage for $10/month?

A cybersecurity consultant built a $10/month persistent workspace for Claude Code and Claude AI using Pi's execution layer, MCP, Cloudflare Tunnel, and a VPS. All tools share one filesystem, database, and knowledge base, bypassing session context loss.

TL;DR

Hacker News post describes $10/month persistent workspace · Claude Code, Claude AI share filesystem via MCP bridge · Pi coding agent's execution layer repurposed in one afternoon

A cybersecurity consultant built a $10/month persistent workspace for Claude Code and Claude AI by repurposing Pi's open-source execution layer. The setup, posted on Hacker News, lets any MCP-compatible tool share one filesystem, database, and knowledge base, eliminating session context loss.

Key facts

  • $10/month total cost to run the persistent workspace
  • One afternoon to build the bridge
  • Five imports from Pi's npm package
  • Cloudflare Tunnel and Worker on free tier
  • SHA256 hashing for every tool call

Key Takeaways

  • A $10/month persistent workspace for Claude Code and Claude AI using Pi's execution layer, MCP, and Cloudflare Tunnel.
  • Bypasses session context loss by sharing one filesystem and database across all MCP-compatible tools.

The $10/month fix for AI context evaporation

GitHub adds Claude and Codex AI coding agents | The Verge

A Hacker News post by a cybersecurity consultant describes a $10/month persistent workspace for Claude Code, Claude AI, and any MCP-compatible tool. The author, who builds AI agent infrastructure, wanted to avoid paying Mem0 or congee $100/month for saving text files. [According to the source] "Every AI I use hits the same wall. The conversation ends and everything disappears."

The solution: a Linux VPS with a shared filesystem, database, and knowledge base. Claude writes an architecture doc; Claude Code can grep for it. The author imported five functions from Pi's npm package @earendil-works/pi-coding-agentcreateReadToolDefinition, createWriteToolDefinition, createGrepToolDefinition, createFindToolDefinition, createLsToolDefinition — registered them as MCP tools, and added a bash shell. The bridge is a single TypeScript file with five dependencies: Pi's package, MCP SDK, Express, an OTP library, and Zod. [Per the source] "The whole thing cost an afternoon to build and $10/month to run."

Architecture: Cloudflare Tunnel, Clerk OAuth, TOTP

A Cloudflare Worker hosts the MCP endpoint, connected via Cloudflare Tunnel to a cheap VPS. No inbound ports, no public IP. Free tier for both. The AI connects with three strings: URL, OAuth client ID, OAuth secret. Auth uses Clerk OAuth at the MCP connection, a shared-secret origin proxy, and a TOTP gateway that locks every tool until the user enters an authenticator code. [The source says] "To pass the TOTP I just tell Claude the code on my authenticator app and he calls the TOTP tool in the MCP."

Every tool call is logged with SHA256 hashes. Every file write creates a backup. Claude installed PostgreSQL in userspace on the box, running SQL queries alongside the markdown layer. [The source notes] "Next conversation, any device, any tool, it greps for prior context and picks up where we left off. Ideas compound instead of evaporating."

The unique take: repurposing agent internals, not building MCP servers from scratch

Homeland Security reassigns 'hundreds' of CISA cyber staffers to ...

The author's insight is that any coding agent that publishes its execution layer as importable modules works for this pattern. Pi happens to be modular enough that the surgery is trivial. [According to the source] "Stop building MCP servers from scratch. A coding agent already built the hard part." This contrasts with the current trend of developers writing bespoke MCP servers for every tool integration. The approach also bypasses Claude Code's SSH throttling — the author notes there's no reason you can't use this pattern to give Claude Code SSH access to dozens of machines.

Security and limitations

The author acknowledges from a security perspective this is "a terrible idea" but works great. The setup runs on a disposable VPS. All tool calls are logged with SHA256 hashes. Every file write creates a backup. The author is a cybersecurity consultant and identity architect who builds AI agent infrastructure because "the tools I want don't exist yet." The source did not disclose the exact VPS provider or the Cloudflare Worker configuration details.

What to watch

Watch for more developers repurposing agent execution layers as shared MCP backends, potentially spawning a new pattern for persistent AI tooling. Also watch for Anthropic's response — whether they add native persistent workspace features to Claude Code or Claude Agent that render this hack unnecessary.


Sources cited in this article

  1. Claude
Source: gentic.news · · author= · citation.json

AI-assisted reporting. Generated by gentic.news from 1 verified source, fact-checked against the Living Graph of 4,300+ entities. Edited by Ala SMITH.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

This Hacker News post represents a practical, low-cost hack that reveals a structural gap in the current AI tooling ecosystem: no major provider (Anthropic, OpenAI, Google) offers a native persistent workspace that spans sessions and devices. The author's approach of repurposing an existing agent's execution layer rather than building MCP servers from scratch is a clever pattern that could gain traction among power users. The key insight is that Pi's modular architecture — publishing its execution layer as importable npm packages — made this possible in an afternoon. This suggests that the next wave of agent infrastructure might focus on exposing internal tooling as composable modules rather than monolithic servers. The security model (Clerk OAuth, TOTP, SHA256 logging) is surprisingly robust for a $10/month setup, though the author admits it's "a terrible idea" from a security perspective. Compared to the recent trend of Claude Code usage limits doubling due to 80x growth, this hack offers a way for power users to bypass session limits and context evaporation without paying for enterprise tiers. The post's timing — appearing alongside Claude Code's growth surge and the release of CLAUDE.md Kit — suggests that the community is actively seeking workarounds for Anthropic's platform constraints.
Compare side-by-side
Claude Code vs Claude AI
Enjoyed this article?
Share:

AI Toolslive

Five one-click lenses on this article. Cached for 24h.

Pick a tool above to generate an instant lens on this article.

Related Articles

From the lab

The framework underneath this story

Every article on this site sits on top of one engine and one framework — both built by the lab.

More in Open Source

View all