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. 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 2102
expanded specification #2102 to 3 accepted children
[260710093543-0142-2103] 09:36:34
[260710093543-0142-2103] 09:36:34  build · MiniMax-M2.7
[260710093543-0142-2103] 09:36:34
[260710093543-0142-2105] 09:36:35  build · MiniMax-M2.7
[260710093543-0142-2105] 09:36:35
[260710093543-0142-2105] 09:36:39  Skill "sandman"
[260710093543-0142-2105] 09:36:40  Skill "sandman"
[260710093543-0142-2105] 09:36:40  Read .sandman/task.md
[260710093543-0142-2105] 09:36:42  Skill "sandman-implement"
[260710093543-0142-2103] 09:36:48  Read .sandman/task.md
[260710093543-0142-2103] 09:36:49
[260710093543-0142-2103] 09:36:49 $ gh issue view 2103 --json title,number,state,body --jq '{title, number, state, body}'
              
Sandman Portal screenshot showing live runs, a selected run, and the Log tab
Real Sandman Portal, captured from Sandman repository's current run state (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 OpenCode as the implementation agent. 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.

OpenCode integration

Sandman runs OpenCode without hiding it.

Sandman uses OpenCode as implementation agent.

Host sessions stay inspectable.

Sandman live-mounts the host OpenCode database, so runs created by Sandman remain visible as native OpenCode sessions.

Debug in the right surface.

Use Portal for delivery state: run status, logs, review gates, and merge readiness. Use OpenCode for the agent transcript when you need to inspect what the model saw or did.

Sandman Review

Review stays inside the AFK gate.

Sandman Review is the local review module for PR feedback. It follows the same idea as OpenCode's GitHub /oc integration: a PR comment triggers agent work. In Sandman, the trigger is /sandman review and the review runs locally.

Comment-driven review.

Sandman Review listens for review request comments in repository PRs, reviews it, and posts feedback requesting changes or approving.

Not an afterthought.

The implementation agent builds and self-reviews first. Sandman Review then handles feedback, repair, green checks, and merge readiness as part of the gate.

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.