- app/: app demo (Kivy/buildozer) da API do robo - software/: servidor RoboMovel (SLAM, profundidade, navegacao) e firmware da base movel (movido de firmware/) - simulacao/: projeto Godot do robo e script de lancamento servidor + simulacao - modelos/: planta do 5o andar do bloco D, cena Blender do corredor e modelo real do robo - partes/mdf/: chapas identificadas e nesting da base do robo (DXF/SVG/FCStd) - projeto/render, relatorio/imagens, slides: renders finais e apresentacoes de progresso - ferramentas/scripts: encaixe de chapas, planta do bloco D e render do corredor no Blender - .gitignore: ignora backups do Blender/FreeCAD e .godot/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.4 KiB
task
Run a background task: a second agent with the same tools and model, working this project in parallel with the chat.
Input — action (required: start, status, list or stop), plus
brief, label and max_steps for start, and task_id for status and
stop
start returns a task id such as t1 immediately, not a result. That is the
whole point: the run keeps going between turns, so the chat can answer you
while a refactor grinds through forty files, and read the outcome later with
status.
A background task is the same agent underneath — same provider, model, API
key and tools — but with its own conversation. It has no user: it cannot
ask a question, so the brief has to be self-contained. Say what to do,
which files or directories it concerns, and what a finished result looks
like; the run ends when the model sends a plain-text message, so the brief
should describe when that is.
status on its own lists every task; with a task_id it returns that run's
trail and, once finished, its result. stop asks a running task to stop. It
unwinds after the model call it is in the middle of, and anything it already
wrote stays written.
max_steps caps the run's model calls — default 20, at most 60. Tasks are
not saved to disk and do not survive a restart of the editor.
Limits and cautions
Four at once. Every task is a separate billed conversation, and rate
limits are per key. start refuses past that, naming the limit. The last
ten finished runs stay readable; older ones are dropped.
Nothing is awaited. A task nobody checks on still runs, still spends tokens and still edits files. It is for well-defined, slow work — not a file you could read directly.
Concurrency is cooperative. All runs and the chat share one thread, so
they interleave at each await. Two tasks editing the same file will still
overwrite each other.
A background run cannot start tasks of its own, restart the editor, or read or change the chat's sessions.
In the dock
A strip above the input box shows one row per task — amber ● running,
green ✓ done, red ✗ failed, grey ■ stopped — with the step count and
elapsed seconds. Click a row to see the brief and the tail of its trail; the
✕ stops a running one. When a task ends, a line is added to the chat. Every
turn's system prompt also lists the tasks started this session, so the model
notices one finishing without polling for it.