Dojo is a lesson app built on the Condensate runtime. Each lesson gives the learner a task, a place to do it, either a terminal or a notebook, and a tutor that reviews the work.
Start Dojo
bun run --cwd apps/dojo dev
Open http://127.0.0.1:4800. dev restarts the server when the source changes, and start runs it without watching. Dojo listens on every interface, so turn on sign-in before anyone else can reach the machine.
Dojo keeps its state under DOJO_HOME, which defaults to ~/.dojo. That includes saved setup and any Claude token in config.json, the learner's working folder for each lesson in workspaces/<id>/, progress in progress.json, and the last 500 chat events of each lesson in sessions/.
Write a lesson
A lesson is a folder under apps/dojo/lessons/ with three files. lesson.json describes it, lesson.md is the brief that both the learner and the tutor read, and an optional setup.sh seeds the working folder the first time the lesson opens. Lessons Dojo generates for you go in DOJO_HOME/generated/, and a hand-written lesson wins if both have the same id.
Field in lesson.json | What it does |
|---|---|
mode | shell gives the learner a terminal, workbench a notebook |
track | The course the lesson belongs to. Lessons unlock in order within a track |
tutor | Extra instructions for the tutor on this lesson |
goals | The skills the lesson checks, in order, shown to the learner as a checklist |
shell | The command the lesson terminal runs. Defaults to a login zsh |
homeIsWorkspace | Sets HOME to the working folder, so dotfile edits stay inside the lesson |
Set DOJO_UNLOCK_ALL=1 while you write lessons to open all of them without completing any.
What the learner sees
The tutor is on one side and the work on the other. Check my work asks the tutor to review what the learner has done, and I'm stuck asks for help. The tutor gives no answer on the first request for help, a hint after one checked attempt, and a worked example on a similar problem after two. In guided mode the tutor also comments when the learner pauses; in on-request mode it waits to be asked.
Where commands run
Each lesson runs in its own Docker container from the dojo-sandbox image, with the learner's folder at /home/student, the lesson's files read-only at /opt/lesson, 1 GB of memory and at most 512 processes. If Docker is not running, Dojo runs commands on the host and logs a warning, and DOJO_SANDBOX=off does the same on purpose. Keep Docker running on any machine you care about if lessons run code you don't trust.
Terminal sessions live on the server and keep the last 256 KB of output, so a learner who reconnects sees where they left off. An idle terminal closes after 2 hours, or after DOJO_PTY_IDLE_MS milliseconds.
A notebook calculation cell runs JavaScript in an isolated interpreter with no imports, 16 MB of memory and 250 ms of script time.
The tutor
The tutor is a Claude Code session, one per lesson, on DOJO_TUTOR_MODEL (default claude-sonnet-5-5). It can read the lesson and the learner's files, edit files in the working folder, run commands, and read the terminal. It never stops to ask for permission, so any tool outside that set is refused, and one run stops after 100 turns.
The tutor needs a Claude login and tries three in order. First is a token saved through the setup screen, which offers claude setup-token when no Condensate runtime answers. Second is an account from the runtime at CONDENSATE_AGENTS_URL: the one DOJO_ACCOUNT names, or else the first Claude account that has not hit its session limit. Last is the Claude login already on the machine.
POST /api/paths turns a topic, or up to 20,000 characters of your own text, into a course of generated lessons, written by DOJO_FORGE_MODEL and DOJO_AUTHOR_MODEL.
Sign-in
Sign-in is off until you set DOJO_PASSWORD or DOJO_JWT_SECRET.
| Method | How it works | Set with |
|---|---|---|
| Password | One shared password, kept in a signed dojo_auth cookie | DOJO_PASSWORD |
| Token | A signed token passed once as ?dojo_token=, then kept in a dojo_jwt cookie | DOJO_JWT_SECRET |
| WorkOS | Sign-in through WorkOS AuthKit at /api/oauth/login. DOJO_ALLOWED_EMAILS limits who may sign in; empty admits anyone | WORKOS_CLIENT_ID, WORKOS_API_KEY, DOJO_JWT_SECRET |
A signed-in user can create a beta code for someone else with POST /api/beta/new.
Settings
| Variable | Default | What it sets |
|---|---|---|
DOJO_PORT | 4800 | Listening port. 0 picks a free one |
DOJO_HOME | ~/.dojo | Folder for all state |
DOJO_SANDBOX | Docker when available | off runs commands on the host |
DOJO_PTY_IDLE_MS | 2 hours | How long an idle terminal is kept |
DOJO_TUTOR_MODEL | claude-sonnet-5-5 | The tutor's model |
DOJO_FORGE_MODEL, DOJO_AUTHOR_MODEL | claude-sonnet-5-5 | Models that plan and write generated lessons |
DOJO_ACCOUNT | first available | Claude account to use from the runtime |
CONDENSATE_AGENTS_URL | http://127.0.0.1:4741 | The runtime |
Run it in a container
apps/dojo/docker-compose.yml runs Dojo on 127.0.0.1:4800 with its state in the dojo-data volume. Inside the container, CONDENSATE_AGENTS_URL defaults to http://host.docker.internal:4741, the runtime on the host.