Show HN: Coasts – Containerized Hosts for Agents
TL;DR Highlight
A CLI tool that resolves port conflicts and environment interference issues when running multiple AI coding agents simultaneously, using Docker-based isolated containers. Combined with git worktree, it enables parallel execution of N independent development environments on a single machine.
Who Should Read
Developers who run multiple AI coding agents like Claude Code or Codex simultaneously, or developers who have struggled with port conflicts or environment interference while doing parallel development with git worktree.
Core Mechanics
- Coasts (Containerized Hosts) is a CLI tool that can spin up N parallel instances of complete development environments on a single machine. By assigning each git worktree its own isolated container environment, multiple AI agents can work concurrently without port conflicts or file interference.
- No changes to existing code are required. Simply add a single Coastfile to the project root, and if you're already using docker-compose.yml, it can be reused as-is. It also works with projects that don't use Docker.
- There are two port strategies: you can 'check out' one coast to bind to standard ports (80, 3000, etc.), while other worktrees are accessed via dynamic ports, allowing you to monitor the progress of multiple environments simultaneously.
- It adopts a DinD (Docker in Docker) approach to provide a full Docker API inside each container. DinD was chosen over simple mount namespaces in order to run the user's docker-compose without modification. However, this incurs approximately 200MB of overhead per containerized host.
- The 'shared-services' concept is supported, allowing services that don't need isolation (e.g., PostgreSQL, Redis) to be declared in the Coastfile so they run only once on the host Docker daemon and are shared across all coasts. This reduces unnecessary resource waste.
- It is not tied to any specific AI provider or agent harness. Since it only requires git worktree, you can switch to any tool—Claude Code, Codex, Cursor, etc.—without needing to change your environment configuration.
- It is designed offline-first with no external service dependencies. A core design principle is that even if the Coasts service itself disappears, local workflows continue to function as-is.
- Running agents directly inside a coast is currently limited due to OAuth token issues. In Anthropic's case, OAuth tokens are quickly invalidated when the runtime environment changes, so using agents inside a coast requires API key-based authentication. Agents that require browser runtimes like Playwright also need separate setup.
Evidence
- "Many comments expressed reactions like 'I've actually experienced this pain.' There were accounts of running 4–5 sessions of Codex/Claude Code in parallel across worktrees, finding it too difficult due to severe port conflicts, and resorting to tools like Cursor or Devin that provide their own containers, or manually isolating environments each time. A competing service called specific.dev posted a comment about solving the same problem differently—their CLI directly manages port allocation and passes assignments via env vars instead of Docker, noting that Docker on Mac still isn't a great experience. They also mentioned the advantage of being able to deploy the same configuration directly to production. An interesting use case idea emerged around using this tool for MCP server isolation. Since MCP servers currently run as local stdio processes, security concerns arise every time a third-party MCP server is installed, and this tool could address that. There was also a suggestion that supporting stdio-to-HTTP bridging would allow local MCP servers to be exposed remotely. A question was raised about how reliably agents respect the 'coast exec' boundary—specifically whether isolation settings are inherited when an agent spawns a sub-agent. This remains unanswered. There was also a technical edge case question about the hot strategy: when running umount -l /workspace + mount --bind + mount --make-rshared inside a DinD container, a new mount could become active while file watchers still hold file descriptors on the old worktree due to lazy unmount, potentially causing continued writes to stale paths. Whether inotify events would allow natural recovery was asked but remains unresolved."
How to Apply
- "If you want to run Claude Code or Codex simultaneously across multiple feature branches, add a Coastfile to the project root, install with 'eval $(curl -fsSL https://coasts.dev/install)', and spin up a coast for each git worktree to run N agent sessions in parallel without port conflicts. If your project already has a docker-compose.yml, you can reference it directly from the Coastfile. Services that don't need isolation, like PostgreSQL or Redis, can be declared as shared-services to be shared across coasts, saving memory. Since there is ~200MB of overhead per coast, it's advantageous to declare as many shareable services as possible. If you want to safely run third-party MCP servers locally, consider using Coasts to run MCP servers in isolated containers. stdio-to-HTTP bridging is not officially supported yet, but isolation itself is possible, making it worth experimenting with to reduce the security risks of untrusted third-party MCP servers."
Code Example
# Installation
eval "$(curl -fsSL https://coasts.dev/install)"
# Coastfile example (add to project root)
# When using docker-compose.yml as-is
compose: docker-compose.yml
# Declare services that don't need isolation as shared (saves resources)
shared-services:
- postgres
- redis
# Run a development environment instance (for each worktree)
# coast up # Start a coast for the current worktree
# coast checkout <worktree> # Bind a specific worktree to canonical ports
# coast exec <worktree> <command> # Run a command inside a specific coastTerminology
Related Papers
Show HN: ctx – Search the coding agent history already on your machine
Claude Code, Cursor, Codex 등 코딩 에이전트가 이전 세션의 논의·결정·실패 시도를 잊지 않도록 SQLite로 인덱싱해 재사용할 수 있게 해주는 오픈소스 CLI 도구다.
Micro-Agent: Beat Frontier Models with Collaboration Inside Model API
vLLM 팀이 단일 모델 API 호출 뒤에서 여러 모델이 협업하는 'Micro-Agent' 개념을 공개했습니다. 별도의 에이전트 코드 없이 라우터 레이어에서 모델 조합을 실행해 GPT-4급 결과를 더 저렴하게 낼 수 있다는 아이디어입니다.
Ornith-1.0: self-improving open-source models for agentic coding
Gemma 4와 Qwen 3.5를 기반으로 파인튜닝한 코딩 특화 오픈소스 모델로, RL(강화학습)을 통해 스캐폴드(에이전트 실행 구조)까지 함께 최적화하는 방식을 주장하지만, 커뮤니티에서는 벤치마크 과최적화에 불과하다는 의심을 받고 있다.
Entity Binding Failures in Tool-Augmented Agents
AI 에이전트가 올바른 도구를 선택해도 잘못된 대상에 실행하는 'Entity Binding 실패' 문제를 정의하고, 이를 막는 실행 정책을 평가한 논문.
Herdr: Agent multiplexer that lives in your terminal
여러 AI 코딩 에이전트(Claude, Codex 등)를 하나의 터미널에서 동시에 실행·관리할 수 있는 Rust 기반 오픈소스 툴로, tmux처럼 세션이 유지되고 SSH로 원격 접속도 가능해 멀티 에이전트 워크플로우를 크게 단순화해준다.
Ornith-1.0: Self-scaffolding LLMs for agentic coding
모델이 문제 풀이 전략(scaffold)을 직접 생성하고 개선하는 자기강화 학습 프레임워크를 적용한 오픈소스 코딩 특화 LLM으로, 9B 소형 모델부터 397B 대형 모델까지 라인업을 갖추고 SWE-Bench 등 주요 벤치마크에서 Claude Opus 4.7을 능가하는 성능을 보여줬다.