Skip to content

Coders can work in their own Upstash Box (0.22.0) - #2

Merged
brainit-consulting merged 8 commits into
mainfrom
feat/upstash-boxes
Oct 29, 2026
Merged

brainit-consulting merged 8 commits into
mainfrom
feat/upstash-boxes

Conversation

@brainit-consulting

Copy link
Copy Markdown
Owner

Coders can work in their own Upstash Box: a Linux machine in the cloud, signed in once to the Overlord's own Claude or Codex subscription, with its own clone of the repo. It takes builds, tests and the test browser off this computer. Testers stay local.

What's in it

  • Box layer (server/boxes.ts): the Box API through @upstash/box; key from UPSTASH_BOX_API_KEY, a shared fine-grained GitHub token from CODEDUNGEON_BOX_GITHUB_TOKEN (env or the Windows user environment, never written to a file or the box's disk); a base snapshot with tmux, the Playwright MCP and its Chromium, no logins.
  • CLI in a box (server/boxRunner.ts): BoxPty implements Pty. The CLI runs in tmux; the dungeon's terminal is tmux attach over a PTY session that reconnects; hooks write to an events file the dungeon follows with tail -F.
  • Guild → Works on (🖥 This PC / ☁ Upstash Box), Sign in the box (the CLI's own sign-in in their terminal), and a Cloud boxes card in Settings (enable, limit, Build the base box, CPU used against the free plan's 5 h).
  • Guide chapter III, how-it-works and the code map describe it.

Measured in the test dungeon (Captain Pickle, port 4470)

  • Issues 96, 98, 100, 102, 104, 106 done by a coder in a box → PRs 97, 99, 101, 103, 105, 107, tested by the local tester and merged.
  • The browser tool in a box: screenshots on a phone held sideways and upright (PR 99).
  • Crash mid-task and restart: the coder resumes in the box with the desk as it was and finishes (PR 105). Ctrl+C mid-task: nothing left running in the box; on start the coder resumes and finishes (PR 107).
  • Leftover CLIs from earlier restarts are stopped when the next one starts (pkill -x tmux matched nothing: tmux's server is named "tmux: server").

Known limits

  • Box CLIs aren't held by the terminal keeper: a restart replays the turn in progress from the transcript.
  • No token metering or browser screenshots collected from boxes; cost comes from the status line.
  • Linked repositories aren't in boxes.

🤖 Generated with Claude Code

brainit-consulting and others added 8 commits October 29, 2026 12:04
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a box behind the Pty interface (tmux, events file)

Smoke-tested against a real box (scripts/box-smoke.ts): output, typing, events and exit code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ox, its CLI through BoxPty; local sessions unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rom the base snapshot, desk and sign-in check in the box, sign-in in their terminal, Cloud boxes card in Settings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m (no Chrome for ARM; exact-build mismatch)

Measured in a box: '--browser chromium' alone fails (wants chromium-1247, base has 1248); with --executable-path it opens pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A resumed session (Carry on, a follow-up message, the recovery after a
restart) was given the desk path on this computer, so its CLI in the box
exited 1 at the cd. deskOf() picks the box's desk for box recruits.

The clean-up before a box CLI starts used pkill -x tmux, which matches
nothing: tmux's server is named "tmux: server". It now finds the
recruits' tmux servers by their command line (-L cd-...). Measured: CLIs
left by restarts were stopped, and a crash mid-task resumes and finishes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…loud boxes

Ctrl+C left a box recruit's CLI running in the box (its stop was sent
without waiting, and the dungeon exited first). Quitting now waits for
it, as it does for local CLIs. Measured: after Ctrl+C mid-task, nothing
runs in the box.

The guide's guild chapter says how to set up Upstash Boxes and move a
coder into one; how-it-works and the code map describe the box layer.
The switch-back note no longer claims the dungeon pauses the box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brainit-consulting
brainit-consulting merged commit 57e9492 into main Oct 29, 2026
3 checks passed
@brainit-consulting
brainit-consulting deleted the feat/upstash-boxes branch October 29, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant