OUTERLAYER_WORK set to a whole number. Every other session stays on your machine.
Before you start
- Install the
outerlayerCLI and sign in. See the quickstart. - Run
outerlayer initin the repository, orouterlayer init --localon this machine. It installs the Claude Code hook that readsOUTERLAYER_WORK. - Use Claude Code. To debug a build that runs Codex or OpenCode, start the agent with
outerlayer codexorouterlayer opencode, and setOUTERLAYER_WORKthe same way.
full tier, a session uploads its turns, tool input and output, thinking, images, subagents and cost. See What leaves your machine.
Get the item’s number
A session links to an item by the item’s number. Starting a session never creates an item.- An item already on the Work page. Read its number on the Work page or on the item’s page.
-
An issue not on the Work page yet. Run this inside the repository’s checkout:
It adds the issue to the Work page, and no runner takes it. It prints the item’s number and a launch line, such as
OUTERLAYER_WORK=7 claude.
Start a session on the item
7 is the work item’s number, not the issue number. /build is the starter skill that outerlayer init installs. It builds the issue into a pull request with its evidence. Leave "/build" off to start an empty session and give your own instructions.
The session appears on item 7’s page and uploads whole, from its first turn to its end.
Your session also takes a claim on the item, unless a runner or another session holds one. The claim stops a runner from starting the item while you work.
Open and declare the pull request
A pull request joins a work item when a session on that item declares it. The/build skill opens the pull request and declares it for you. outerlayer sync also declares a pull request whose link is in the session’s transcript.
Declare the pull request yourself in two cases:
- The transcript holds no link to it.
- You opened it outside the session.
gh under your login. If a pull request is already open on the branch, the command edits that one. See work open-pr.
To declare a pull request that is already open, run this inside the session, from the checkout where you opened it:
- To name a different repository, add
--repo <owner/name>. - To declare from another shell, add
--session-id <id>. For Claude Code, it is the id thatclaude --resumetakes.
outerlayer work pr lists each refusal, and says how to withdraw a declaration made onto the wrong item.
End the session’s claim
While your session holds the claim, the item reads With agent, and its review stays closed. The item page says “A session still holds this item. Review opens when the session ends or releases it.” The claim ends when the session ends. The/build skill also releases it as its last step.
To release the claim yourself, run this inside the session:
outerlayer work release.
If a session does not upload
Check the value of OUTERLAYER_WORK
The value must be a whole number: the number of an item in the factory this repository is connected to.
The CLI appends each refusal reason to
~/.outerlayer/spool/hook-errors.log. The next session start tells you so.
Check that a session was launched
Run a dry run. It sends nothing:N transcript(s) — not launched with OUTERLAYER_WORK counts the sessions that started without the variable. Those sessions never upload.
If you forgot the variable
Claude Code reads the variable only when it starts. Exporting it inside a running session does nothing. Do not runouterlayer work link-session instead. It links the session to the item, but the transcript still does not upload.
End the session and resume it with the variable set: