Offload a heavy read-only task
offload_submit_taskSubmits a heavy read-only scanning or analysis task to a background worker and returns a job ID immediately, so you can avoid reading large files yourself.
Instructions
Hand a heavy READ-ONLY task to a background worker agent (default: agy) and get a job_id back immediately.
Use it when the work means reading a lot but the answer is small: scanning many files, filtering large logs, analyzing a big bundle or resource file, inventorying APIs/strings/config across a tree. The worker replies with a short Summary plus Findings with path:line evidence, so you read a few hundred words instead of the files.
Do NOT use it for edits, for small lookups you can do in one or two reads, or for anything security-sensitive you must verify line by line yourself. The worker is another model: treat its findings as leads and spot-check the ones you act on.
Write a complete BRIEF. The worker executes it literally and does nothing else, so anything you leave vague it will skip or guess:
task: the goal as one concrete question.
steps: ordered, concrete actions; each names what to open or search and what to record.
output_hint: the exact shape of the Findings (columns, grouping, sort order, what goes in each column).
done_when: the stop condition, so the worker neither stops early nor wanders.
context (optional): what you already know (conventions, file roles), so the worker does not rediscover it.
exclude (optional): files, folders or kinds of results to leave out. The worker returns a Step log; the status tells you which steps it did not finish and which in-scope files it never opened.
Each job costs the worker a fixed preamble (about 20k tokens for agy) before it reads anything, so do small lookups yourself. A brief identical to a finished job, over unchanged files, returns that job instead of running again (reuse=false to force a new run).
Next: call offload_get_status with the job_id and wait_sec=50 until it finishes. To ask the worker more about its report, use offload_followup: it keeps what the worker already read.
Example: task="Which HTTP endpoints does api/v1 register, and what auth does each require?" steps=["List every .php file under api/v1 from FILES IN SCOPE.", "In each file, find each route: URL path and the HTTP methods it accepts.", "For each route, record the auth check it calls (function name), or 'none'."] output_hint="table: url | methods | auth check | handler path:line, sorted by url" done_when="Every file under api/v1 has been read and every route is in the table." exclude=["api/v1/tests/"]
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task": "<task>",
"steps": "<steps>",
"output_hint": "<output_hint>",
"done_when": "<done_when>"
},
"name": "offload_submit_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | The goal: one concrete question the report must answer, e.g. "Which endpoints in api/v1 skip the CSRF check?" | |
| tier | No | Worker model tier, when the backend defines tiers: low for mechanical inventories, medium by default, high for hard reading or a retry after a weak result. | |
| model | No | Exact worker model id; overrides tier. | |
| paths | No | Files or folders to focus on, relative to the workspace, e.g. ["api/core", "dist/app.js"]. Empty = whole workspace. | |
| reuse | No | Return a finished job with the same brief over unchanged files instead of running again. | |
| steps | Yes | Ordered actions for the worker, each concrete: what to open or search, what to record. The worker performs exactly these, in order, and logs each as done/partial/not done. | |
| backend | No | Backend name from the config. Available: agy. | |
| context | No | Facts you already know that save the worker time: conventions, which file does what, names to look for. | |
| exclude | No | What to leave out: files, folders, or kinds of results, e.g. ["tests/", "commented-out code"]. | |
| done_when | Yes | Stop condition, e.g. "every file under api/v1 is read and every route is listed". | |
| workspace | No | Absolute workspace path. Defaults to the current project; other paths must be listed in allowedRoots. | |
| output_hint | Yes | Exact shape of the Findings, e.g. "table: name | path:line | purpose, sorted by path". | |
| timeout_sec | No | Kill the worker after this many seconds. Defaults to the backend's timeoutSec. |