Triggering a job
A new user message starts a Smart+ job when all of these hold:
- the model is
smart-plus(orsmart+), which every plan includes; - the request declares a shell tool: a tool named
bash,shell,run_shell_command,execute_command,run_command,terminalorexec_command, or alocal_shelltool. Claude Code, Codex and pi all declare one; - the agent runs inside the project, ideally a git repository, so the pack knows what is tracked.
Otherwise the turn is answered as an ordinary Smart turn. See fallbacks.
What your agent sees
- Pack and upload. The router answers the task with a shell tool call: one command that packs the repository and uploads it. Your agent runs it like any other command.
- The job streams. The command's output comes back as the tool result. The router starts the job and streams its phases as assistant text: setup, explore, build, test and QA.
- Download and apply. When the job is done, the router answers with a second shell tool call that downloads the patch and applies it.
- Summary. The apply output comes back as the tool result, and the router closes the turn with what changed, the test result and the QA verdict.
If the stream ends while the job is still running, send any message in the same conversation to pick up the progress or the result.
In outline, the pack command is:
set -eu
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
A=$(mktemp); L=$(mktemp)
git ls-files -z --cached --others --exclude-standard > "$L"
tar --null -czf "$A" -T "$L"
curl -fsS -X POST --data-binary @"$A" \
-H "authorization: Bearer $JOB_TOKEN" \
-H 'content-type: application/gzip' \
"https://api.routerlane.com/v1/handoff/$JOB/upload"
rm -f "$A" "$L"The router writes the job id and its token into the command it sends. Only tracked files and new files that are not ignored are packed: no git history, no ignored files, no node_modules. The command reports the repository root, commit, branch and size before uploading, and reports the size instead of uploading when the archive passes 120 MB.
The apply command checks the patch first, applies it with git apply, falls back to a three-way merge only if a plain apply fails, and saves the patch as smartplus-<job>.patch in the repository root if neither works. Nothing is committed.
Endpoints
These endpoints take the job token, not your API key: Authorization: Bearer with the token from the command.
POST /v1/handoff/{job}/upload
POSThttps://api.routerlane.com/v1/handoff/{job}/upload
Body: a gzip tar of the repository, content-type: application/gzip, up to 120 MB.
{"ok": true, "files": 45, "bytes": 184320}GET /v1/handoff/{job}/patch
GEThttps://api.routerlane.com/v1/handoff/{job}/patch
Returns the patch as text/x-patch, a git diff against the copy's baseline, with the file name smartplus-{job}.patch.
GET /v1/handoff/{job}/status
GEThttps://api.routerlane.com/v1/handoff/{job}/status
The job's state and its latest events.
{
"job": "3be81f0c9d2a4e67",
"status": "running",
"phase": "build",
"events": [
{"ts": 1791331262.4, "kind": "phase", "text": "Reading the repository to work out what has to change."},
{"ts": 1791331279.9, "kind": "phase", "text": "Building on claude-opus-5.5."}
],
"files_changed": null,
"verdict": null
}Errors
| Status | Body | Cause |
|---|---|---|
| 400 | {"detail": "the archive could not be read: not a gzip file"} | The upload is not a readable gzip tar |
| 401 | {"detail": "bad job token"} | Missing or wrong job token |
| 404 | {"detail": "no such job"} | Unknown job id |
| 404 | {"detail": "no patch for this job"} | The job changed nothing, or is not finished |
| 409 | {"detail": "this job is uploaded"} | The job is not waiting for an upload |
| 413 | {"detail": "the upload passed the Smart+ limit of 120 MB"} | The archive is over 120 MB |
Limits
| Upload | 120 MB packed |
|---|---|
| Size per job | A ceiling on every job. A job that reaches it stops, delivers what it has, and says so. |
| Commands | Every command on RouterLane's machine has a timeout and an output cap |
| Workspace | Wiped, with the job's content, within 48 hours |
| Plans | Solo, Team and Pro, at no extra charge |
Fallbacks
A Smart+ turn becomes an ordinary Smart turn, and the reason is recorded, when:
- the client declares no shell tool;
- the repository packs to more than 120 MB;
- the upload did not arrive;
- too many jobs are already running;
- Smart+ is switched off for the deployment.
Headers
Job turns carry x-router-tier: smart-plus and x-router-source: smartplus. A job is part of your plan, with no usage limits and no extra charge; its agents work at your plan's speed. The upload itself costs no tokens.