Docs

Smart+

Smart+ runs a whole task on RouterLane's machine against a copy of your repository and sends back one patch. Your agent does the two steps that touch your machine: it uploads the repository, and it applies the patch.

Triggering a job

A new user message starts a Smart+ job when all of these hold:

  • the model is smart-plus (or smart+), and your plan includes the tier;
  • the request declares a shell tool: a tool named bash, shell, run_shell_command, execute_command, run_command, terminal or exec_command, or a local_shell tool. 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

  1. 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.
  2. 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.
  3. Download and apply. When the job is done, the router answers with a second shell tool call that downloads the patch and applies it.
  4. 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:

pack and upload, as sent by the router
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.

200 response
{"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.

200 response
{
  "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

StatusBodyCause
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

Upload120 MB packed
Spend per job$1.50 by default. A job that reaches it stops, delivers what it has, and says so.
CommandsEvery command on RouterLane's machine has a timeout and an output cap
WorkspaceDeleted 48 hours after the job
PlansEnterprise, opt in per plan

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 and billing

Job turns carry x-router-tier: smart-plus and x-router-source: smartplus. Every token the job's agents spend is billed at Smart rates on the request for the turn that started the job, and nothing is billed twice. The upload itself costs no tokens.