Skip to content

Starter kits

Use a room from your coding tools

Run pooled serve on your computer and point Codex CLI, Claude Code or opencode at the room's model. Copy-paste setup for each.

Goal: your coding agent runs on the room’s model instead of a cloud API.

pooled serve is a small program from the @pooled/cli package (version 0.3.3). It joins the room as a client and serves the room’s model on 127.0.0.1, as an OpenAI and an Anthropic API. It needs no GPU: the model still runs on the room’s devices.

  • A room running a big model. Coding agents send long prompts (15,000 to 20,000 tokens for Codex and Claude Code) and need a model that calls tools reliably. Use the Qwen3.6 35B MoE (22.5 GB across the room) or the Qwen3.8 27B at 32K context. The 1.7B is too small. See Pool two devices.
  • Node 22 or newer on the computer where your tool runs. Check with node --version.
  • The tool: Codex CLI, Claude Code or opencode.
  • 15 minutes. The first prompt takes a while: the room reads the agent’s whole system prompt once.
  1. Start the room with a long context. On the device that will host, open the room with ?ctx= before you press Start the model:

    https://pooled.run/room?ctx=65536

    Pick Qwen3.6 35B MoE and press Start the model. (For the 27B, use ?ctx=32768.)

  2. Copy the command. In the room, press Serve API in the header. The page shows the command for this room with a Copy button. On the device that opened the room, it carries the invite link:

    npx @pooled/cli serve "https://pooled.run/r/4TKG9P#k=…"

    Keep the quotes: the # starts a comment in most shells. This guide was checked with @pooled/cli 0.3.3. To use exactly that version, write npx @pooled/cli@0.3.3 serve ….

  3. Run it on the computer where your tool runs, and leave it running.

    Once the model is ready, it prints the two base URLs, then settings for Codex, Claude Code and opencode sized for your room’s context:

    pooled serve · room 4TKG9P · Qwen3.6 35B MoE · Q4 · 65536 tokens of context
    OpenAI http://127.0.0.1:8080/v1 (OPENAI_BASE_URL, any API key: chat/completions, responses)
    Anthropic http://127.0.0.1:8080 (ANTHROPIC_BASE_URL: messages)
    bound to 127.0.0.1 only · no token (set POOLED_TOKEN to require one)
    prompts go to the room's host and may be shown to everyone in the room
    For this room's 65536-token context:
    Codex model_context_window = 65536, model_auto_compact_token_limit = 52428 (~/.codex/config.toml)
    Claude Code ANTHROPIC_BASE_URL=http://127.0.0.1:8080 ANTHROPIC_API_KEY=pooled CLAUDE_CODE_MAX_CONTEXT_TOKENS=65536 …
    opencode OPENCODE_DISABLE_CLAUDE_CODE=1 opencode, with this opencode.json: …
    The pooled serve banner for a 65536-token room with Qwen3.6 35B MoE, with settings for Codex, Claude Code and opencode
    The banner for a test room with the 35B MoE at 64K, opened with pooled host.
  4. Check it answers. In another terminal:

    curl http://127.0.0.1:8080/v1/chat/completions -H 'content-type: application/json' \
    -d '{"model": "pooled", "messages": [{"role": "user", "content": "Say hi"}]}'

    You get a JSON answer from the room’s model, with "model":"pooled/qwen3.6-35b-moe". The room’s chat shows it too, marked “via API”.

    The curl command and its JSON answer from pooled/qwen3.6-35b-moe: Hi! How can I help you today?
  5. Set up your tool. Use the numbers the bridge printed. The ones below are for a 64K room.

    Add this to ~/.codex/config.toml:

    ~/.codex/config.toml
    model = "pooled"
    model_provider = "pooled"
    model_context_window = 65536
    model_auto_compact_token_limit = 52428
    [model_providers.pooled]
    name = "Pooled"
    base_url = "http://127.0.0.1:8080/v1"
    wire_api = "responses"

    Then run codex in your project. Codex warns that model metadata for pooled is not found. That is harmless: the two numbers above give it what it needs.

  6. Give it a small first task, like Read README.md and tell me what this project does. The first answer is the slow one. After that, the room reuses what it already read and each step reads only the new part.

    opencode reads README.md and says the project is a tip calculator web page
    opencode answering through a room with the 35B MoE, in 27 seconds. The project is one HTML file and a README.
  • After step 3: the banner. On the room’s Serve API page, “Waiting for a client to connect” changes to say a client is connected.
  • After step 6: the tool’s usual screen, answering from the room. On the 35B MoE, answers stream at the room’s speed (about 30 to 50 words a second on one or two fast computers).

Requests get 503 or the tool says the model is unavailable

Section titled “Requests get 503 or the tool says the model is unavailable”

The room’s model isn’t started, or the host’s page closed. Start the model in the room and keep that page open. Until then the bridge answers 503 with Retry-After: 5, and GET http://127.0.0.1:8080/health shows "ready": false.

Claude Code says “Prompt is too long” before sending anything, or Codex or opencode fail with a 400

Section titled “Claude Code says “Prompt is too long” before sending anything, or Codex or opencode fail with a 400”

The tool doesn’t know the room’s context, or the room’s context is too small for its prompt. Use the numbers the bridge printed, and a room with the MoE or the 27B at 32K or more.

The bridge says “waiting for the host of room … to let this client in”

Section titled “The bridge says “waiting for the host of room … to let this client in””

You gave it the room code, not the invite link. The host presses Allow on the room page, or you run the command from the Serve API page on the device that opened the room. If the host turned off Allow API clients in the room’s settings, turn it back on.

More: Troubleshooting: Serve API.