{"slug": "show-hn-pier-give-every-agent-session-its-own-cloud-vm-on-your-own-infra", "title": "Show HN: Pier – Give every agent session its own cloud VM, on your own infra", "summary": "Pier v0.2.3, an open-source tool by developer Kerem Kaynak, gives every coding agent session its own cloud VM on a user's own AWS infrastructure, with sessions parking themselves when idle and resuming in about 20 seconds. The tool, installable via Homebrew, costs roughly $0.04 per hour on a default t4g.medium instance and eliminates the need for a control plane by storing session state in EC2 instance tags.", "body_md": "[v0.2.3 · release notes](https://github.com/kerem-kaynak/pier/releases/latest)\n\n# Give every agent session its own VM.\n\nFull dev environments on your own AWS account. Your repo, your secrets, your tools. Detach and it parks itself. Attach and it is back in about 20 seconds.\n\n`brew install kerem-kaynak/tap/pier`\n\n## ##Why pier\n\nCoding agents changed what a dev environment is. A session is no longer you at one machine. It is an agent that runs for hours and wants its own branch, its own ports, its own docker daemon. And you want several at once. Every existing place to run them fights you:\n\n- [x]\n**Your laptop.** Sessions fight over ports and files. Closing the lid kills the run. - [x]\n**Hosted agent platforms.** Your code, your secrets, and your agent's credentials live on someone else's infra, billed by the seat. - [x]\n**A cloud dev box.** Bills 24/7 while the agent thinks and while you sleep. You still hand-build repo, auth, secrets, and tools for every session.\n\npier makes each session a micro-VM that manages its own lifecycle. One command launches an EC2 instance and drops you into tmux inside it, with:\n\n- [+] your repo on a fresh branch, uncommitted edits included\n- [+] Claude Code and Codex installed and authenticated\n- [+] your MCP servers configured\n- [+] your dev environment built by the repo's own setup script\n\n## ##What you get\n\n- [+]\n**Parks itself.** An in-VM supervisor stops the instance once the agent goes quiet. The disk persists. - [+]\n**Resumes in about 20 seconds.** Files, branches, and credentials exactly as you left them. - [+]\n**Sessions as hostnames.**`pier proxy`\n\nserves the dev server at`checkout-flow.pier:3000`\n\n, mirrored on localhost too. - [+]\n**One-command resize.** Outgrown the box? One 40 second cycle swaps the instance type, disk intact. - [+]\n**GitHub-first transfer.** The VM fetches your repo straight from GitHub. Only secrets ride the tunnel. - [+]\n**Per-repo baked images.**`pier bake`\n\nsnapshots your toolchain once. Creates drop to about 60-90 seconds. - [+]\n**No control plane.** No server, no database, no daemon. Session state lives in EC2 instance tags. - [+]\n**One transport.** Attach, exec, file push, and port forwards are all OpenSSH, direct or over an SSM tunnel.\n\n## ##The numbers\n\n`~$0.04/h`\n\nMeasured on the default t4g.medium. A stock create is attachable in 42 seconds while agent harnesses finish in the background. A baked create takes 10 seconds longer to boot but arrives with everything installed.\n\n## ##How it works\n\nA session is one EC2 instance plus its EBS disk, tagged and namespaced by your caller identity. All state lives in those tags and on the disk. There is nothing else to operate, back up, or pay for.\n\n```\nflowchart LR\n  subgraph laptop[\"laptop\"]\n    cli[\"pier CLI / TUI\"]\n  end\n  subgraph aws[\"AWS account (yours)\"]\n    api[\"EC2 APIcreate / stop / start / tags\"]\n    subgraph vm[\"session VM\"]\n      tmux[\"tmux · claude / codex\"]\n      sup[\"pier-supervisorparks the VM when detached and quiet\"]\n    end\n  end\n  cli -- \"aws cli\" --> api\n  cli -- \"ssh, SSM tunnel as fallback\" --> tmux\n```\n\nlaptop AWS account (yours) ────── ─────────────────── pier CLI/TUI ── aws cli ──────────▶ EC2 API (create/stop/start/tags) │ ┌─────────────────────────┐ └── ssh ─────────────────────▶ │ session VM │ (direct to its public IP, │ tmux ▸ claude / codex │ SSM tunnel as fallback) │ pier-supervisor │ │ └─ parks the VM when │ │ detached and quiet │ └─────────────────────────┘\n\n- [+] The supervisor samples every 5 seconds for attached and busy. Detached and quiet past the idle timeout parks the VM.\n- [+] The VM holds no cloud credentials. Parking is the VM running\n`shutdown -h now`\n\n. Anything needing account credentials happens from the laptop. - [+] A runaway cap parks a looping agent anyway, so it cannot burn compute for days.\n\n## ##vs. other tools\n\n| pier | Codespaces | Hosted agents | DIY EC2 | |\n|---|---|---|---|---|\n| Runs on | your AWS account | GitHub's infra | vendor's sandbox | your AWS account |\n| Idle cost | `~$3-4/mo` (self-parks) | metered, auto-stop | per-seat / per-task | full rate unless you script it |\n| Agent-ready | harnesses + auth + MCP travel | you configure | their agent only | you configure |\n| Session lifetime | until you `rm` it | workspace-scoped | task-scoped | until you clean it up |\n| Interface | your terminal, tmux | VS Code / web | web UI | your terminal |\n| Setup | one wizard | per-repo config | account signup | everything by hand |\n\n## ##FAQ\n\n## Does pier need a server or a database?\n\nNo. There is no control plane. Session state lives in EC2 instance\ntags, and `pier ls`\n\nis a filtered describe-instances call.\n\n## Does the VM hold my cloud credentials?\n\nNo. The instance role carries SSM and nothing else. Parking is the VM shutting itself down. Resize and destroy happen from the laptop.\n\n## What happens when I close my laptop?\n\nThe session keeps running without you. Once the agent goes quiet past the idle timeout, the supervisor parks the VM. Attach later and it resumes in about 20 seconds.\n\n## How do secrets travel?\n\nOnce, at create, as an explicit manifest: your agent configs, your\ntokens, and the repo files your `.pier-include`\n\nlists.\nNothing loose ships by default, and the create prints which env\nfiles it is not carrying.\n\n## Do private repos work?\n\nYes. pier reuses whatever GitHub credential your laptop already has:\na `gh`\n\nlogin, git's https credential helper, or ssh keys\nthrough a forwarded agent. It verifies the fetch works before\nrelying on it.\n\n## What survives parking?\n\nFiles, git state, and installed tools survive. Running processes do not, parking is a clean stop. Hibernate with RAM intact is on the roadmap.\n\n## Which platforms?\n\nThe CLI runs on macOS and Linux against AWS. `pier proxy`\n\nis macOS-only for now, `pier port`\n\nworks everywhere. A\nGCP driver is designed and parked on the roadmap.\n\n## How do I get rid of everything?\n\n`pier teardown`\n\nremoves every piece of account groundwork\npier created, all of it tagged. Sessions go with `pier rm`\n\n.\n\n## Tie up at the pier.\n\nOne wizard, then every session is one command away.\n\n`brew install kerem-kaynak/tap/pier`", "url": "https://wpnews.pro/news/show-hn-pier-give-every-agent-session-its-own-cloud-vm-on-your-own-infra", "canonical_source": "https://pier.kak.dev/", "published_at": "2026-08-09 11:14:22+00:00", "updated_at": "2026-08-09 11:35:26.557084+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-infrastructure"], "entities": ["Kerem Kaynak", "Pier", "AWS", "EC2", "EBS", "Homebrew", "Claude Code", "Codex"], "alternates": {"html": "https://wpnews.pro/news/show-hn-pier-give-every-agent-session-its-own-cloud-vm-on-your-own-infra", "markdown": "https://wpnews.pro/news/show-hn-pier-give-every-agent-session-its-own-cloud-vm-on-your-own-infra.md", "text": "https://wpnews.pro/news/show-hn-pier-give-every-agent-session-its-own-cloud-vm-on-your-own-infra.txt", "jsonld": "https://wpnews.pro/news/show-hn-pier-give-every-agent-session-its-own-cloud-vm-on-your-own-infra.jsonld"}}