Sandman markSANDMAN
Sleep while your agents code
Sleep while your agents code

AFK coding agents orchestration in isolated sandboxes

Sandman turns one clear GitHub issue into an autonomous delivery loop with OpenCode or Claude Code (experimental in v1). It plans the implementation, runs the agent in an isolated environment, stores progress in task.md, drives review, and merges the PR when the gates pass.

Specification

Clear intent and checks

A clear Specification or bug brief produces a well-described GitHub issue. Sandman only needs the work to be precise enough to run.

SANDMAN
  1. 01Create isolated environment
  2. 02Render task.md
  3. 03Plan the implementation
  4. 04Build with TDD and checks
  5. 05Self-review and open PR
  6. 06Drive review to merge
Validation

Validate before release

Merge lands on a reference branch. Run smoke, e2e, and QA before promoting to production, just like fast human work.

Issue quality

Good input is still the unlock.

Sandman can run while you sleep when the issue has crisp intent, bounded scope, and visible checks.

SSpecific outcome
MMeasurable checks
AAchievable slice
RRelevant context
TTime-bounded scope
Operate the loop

Autonomous does not mean invisible.

Sandman is a CLI application. Portal is a visualization layer for current runs, queued issues, blockers, review state, logs, and merge readiness.

You do not babysit the agent, but you can inspect the loop at any time.

sandman main ? ❯ sandman run 447 --model opencode/muse-spark-1.2-contributor-free --continue
[260902115556-b36b-447] 11:56:17 → Read /workspace/.sandman/worktrees/447-add-subtractive-extrusion-through-every-adapter/.sandman/task.md
[260902115556-b36b-447] 11:56:20 $ git status; echo "---"; git branch --show-current; echo "---"; git log --oneline -10; echo "---"; git log origin/main...
[260902115556-b36b-447] 11:56:22 $ git diff origin/main --stat; echo "---"; gh pr view --json number,title,state,url,headRefOid,baseRefName,mergeable,re...
[260902115556-b36b-447] 11:56:40 $ gh pr list --head 447-add-subtractive-extrusion-through-every-adapter --json number,title,state,url 2>&1; echo "---";...
[260902115556-b36b-447] 11:56:42 → Read /workspace/.sandman/worktrees/447-add-subtractive-extrusion-through-every-adapter/AGENTS.md
[260902115556-b36b-447] 11:56:43 $ cat docs/agents/issue-tracker.md 2>&1 | head -n 100; echo "---"; cat docs/agents/domain.md 2>&1 | head -n 100
[260902115556-b36b-447] 11:56:45 → Read /workspace/.sandman/worktrees/447-add-subtractive-extrusion-through-every-adapter/CONTEXT.md
[260902115556-b36b-447] 11:56:46 $ git diff origin/main -- crates/host/src/lib.rs | head -n 300
[260902115556-b36b-447] 11:56:51 $ git diff origin/main -- crates/protocol/src/schema.rs crates/protocol/src/schema_validator.rs crates/persistence/src/...
[260902115556-b36b-447] 11:56:53 → Skill "sandman"
[260902115556-b36b-447] 11:56:55 → Skill "sandman-implement"
[260902115556-b36b-447] 11:56:56 → Skill "sandman-code-review"
[260902115556-b36b-447] 11:56:58 $ git diff origin/main...HEAD --stat; echo "==LOGS=="; git log --oneline origin/main..HEAD
[260902115556-b36b-447] 11:57:00 $ git diff origin/main...HEAD | head -n 200
[260902115556-b36b-447] 11:57:04 → Skill "sandman-back-merge"
[260902115556-b36b-447] 11:57:09 $ git status --short; echo "---"; git fetch origin 2>&1 | head -n 20; echo "---fetch done"; git merge-base --is-ancesto...
[260902115556-b36b-447] 11:58:10 $ cargo fmt --check 2>&1 | head -n 50; echo "fmt check exit $?"; echo "---"; cargo test --quiet --workspace 2>&1 | tail...
[260902115556-b36b-447] 11:58:45 $ cargo test --quiet 2>&1 | tail -n 30; echo "exit:$?"
[260902115556-b36b-447] 11:58:53 $ git push -u origin 447-add-subtractive-extrusion-through-every-adapter 2>&1
[260902115556-b36b-447] 11:58:55 $ git log --oneline -1 --format="%s"; echo "---"; git log --oneline origin/main..HEAD --format="%s"
Sandman Portal screenshot showing live runs, a selected run, and the Log tab
Real Sandman Portal (Sandman Light theme).
Receipts, not vibes

Every run leaves an auditable trail.

task.md

Rendered task, progress notes, and the continuation point for sandman run 1234 --continue.

Logs and events

Agent output, targeted checks, repair loops, and review responses.

Pull request

Code diff, review thread, green CI, merge decision, and linked issue.

Validation

Sandman feeds validation, never skips it.

Treat agent output the way you treat fast human output: the loop can merge to a reference branch, but release confidence comes from recurring validation across changes.

Good engineering still applies.

TDD is not an AI novelty. It is a traditional control that helps agents work in smaller, safer loops. Keep it, then add broader validation where risk demands it.

  • Targeted tests during implementation
  • Self-review before PR creation
  • Green CI before merge
  • Smoke, e2e, QA, or wider suites after groups of merged work

Reference branch is not production.

The reference branch Sandman merges into should be a branch you can validate, not a direct production promotion.

Today Sandman integrates with GitHub for source control and issues, and supports OpenCode plus Claude Code (experimental in v1) as implementation agents. That boundary may broaden over time, but the durable idea is the same: workflow-agnostic AFK delivery.

Recommended workflow

Prepare work clearly, then let Sandman run it.

The recommended path resolves uncertainty before Sandman takes over the autonomous delivery loop.

Matt Pocock workflow

wayfinder->to-spec->to-tickets->Sandman->Validation

Use the skills to resolve uncertainty, publish the Specification, and slice clear GitHub issues. Sandman runs the ready issue frontier AFK. This is recommended, not required: Sandman can start from any sufficiently clear GitHub issue.

Agent integrations

OpenCode or Claude Code. One delivery loop.

Choose your implementation agent without changing how you track work, inspect progress, or validate delivery. New projects default to OpenCode v2; Claude Code support is experimental in v1.

OpenCode

Start with sandman init. Sandman live-mounts the host OpenCode database, so runs remain visible as native OpenCode sessions.

Claude Code

Start with sandman init --agent claude to use your Claude subscription.

Explicit session reuse resumes the exact recorded Claude conversation, not the latest session in a shared directory.

Use Portal for run status, logs, review gates, and merge readiness. Use your agent's native transcript for deeper inspection. See agent compatibility and setup for authentication and session details.

Sandman review daemon

Run an independent code review from a GitHub pull request. The daemon checks the change against the specification, traces the affected code paths, and posts a review decision with evidence.

Request a review

Start the daemon with sandman review. From the GitHub account the daemon uses, comment /sandman review on a pull request.

Configure delegated review to make implementation runs request reviews automatically. Choose a reviewer model independently of the implementation model.

Escalate systemic defects

The reviewer can escalate on the first pass when a defect affects a shared contract. If a defect recurs after a fix, it can reassess the architecture and propose a design change.

The review report ties related findings to their root cause and gives the implementation agent a repair strategy and regression scenarios to verify.

Ready for implementation

Wake up to merged PRs, then validate like an engineer.

Sandman makes AFK coding operational: explicit input, isolated environment, durable progress, review gates, merge discipline, and a clear post-merge validation step.