Running tasks
A task is a concrete request that should produce work — code, files, a plan, a written answer with artifacts. This page covers how tasks are submitted, classified, executed, and stopped.
Ways to submit a task
Section titled “Ways to submit a task”| Form | Behavior |
|---|---|
tapplack |
Interactive session; task sent from the prompt. |
tapplack start "..." |
One-shot task, then exit. |
tapplack "..." |
Bare text is treated as a one-shot task. |
tapplack start --force "..." |
One-shot task, bypassing the intent gate. |
One-shot runs print the result and exit. Interactive runs stay open and can run several tasks with accumulated context.
The intent gate
Section titled “The intent gate”Before any provider call, a local heuristic classifies the input. This is the cheap first layer: it avoids spinning up a workflow — and spending free-tier quota — for something that does not need it.
| Kind | Example | What happens |
|---|---|---|
chat |
“hi”, “thanks”, “test” | A local reply. No model call. |
meta |
“what commands do you have?” | A local answer about Tapplack. |
vague |
“fix it” | A local request for a specific task. |
question |
“what does this project do?” | One short model call, then answer. |
task |
“add a –strict flag and update tests” | The configured workflow runs. |
The triage result is shown before the task runs. When the gate chooses a non-task path, no run directory is created.
To skip the gate entirely:
tapplack start --force "summarize the files in workspace"Use --force when you know the request is work but the wording is terse.
What a run does
Section titled “What a run does”For a task, the orchestrator:
- Creates
runs/<run-id>/. - Runs the configured agent or pipeline (see Workflows).
- Streams tool activity and file changes to the session.
- Writes per-stage artifacts and
FINAL.md. - Writes
run.jsonwith totals, timings, and incidents. - Prints a summary with token usage and the output path.
The run directory layout is documented in Runs and artifacts.
Agent loop and limits
Section titled “Agent loop and limits”Each agent call loops: send the prompt to the provider, execute any requested tools, feed the results back, and repeat until the model stops requesting tools or a limit is reached.
Limits live under runtime in the config:
| Setting | Default | Meaning |
|---|---|---|
maxToolRounds |
8 |
Tool rounds per agent invocation. |
maxAgentCallsPerRun |
24 |
Total agent calls in a run. |
requestTimeoutMs |
120000 |
Per-request timeout. |
maxTaskRetries |
3 |
Automatic retries for a failed task. |
When the budget is exhausted the agent returns a partial result rather than hanging. Raise the limits deliberately — they exist to keep a loop from running away.
Retries and failover
Section titled “Retries and failover”Two retry layers exist:
- Provider retries — a 429, 5xx, or timeout is retried on the same provider with exponential
backoff, controlled by
retryAttempts,retryBaseDelayMs, andretryMaxDelayMs. - Provider fallback — when the retries are exhausted, the next provider in the agent’s
fallbackchain is tried.
On top of that, maxTaskRetries lets the orchestrator retry a failed task. Each failure is written
to runs/error-logs/ (or runtime.errorLogsDir) so the cause is not lost.
If a provider fails hard, the agent asks it to try a different approach. A repeated failing action is not blindly re-executed; side-effecting actions already applied in an invocation are skipped.
Cancellation
Section titled “Cancellation”Press Ctrl+C during a run (or send SIGINT to a one-shot run) to abort gracefully.
Partial artifacts are still written, and the final report is marked as aborted with the incident
recorded. When no run is active, Ctrl+C clears the current input instead.
Task outcomes and history
Section titled “Task outcomes and history”Interactive sessions record each task’s outcome — success, failure, or pending approval — with a
reason. Use /history to list them and /history clear to reset.
Outcomes are also carried into later prompts as context. This means a follow-up can reference a previous failure and ask the agent to adapt. It also means a session with a lot of history sends more context; start a new session for unrelated work.
Sessions and context
Section titled “Sessions and context”An interactive session maintains:
- a transcript at
runs/sessions/<session-id>.md, - the running conversation context,
- the task-outcome history.
The context is bounded by the providers’ token limits and by each agent’s maxTokens. If a session
gets very long or drifts, exit and start fresh.
Passing a prompt that looks like a flag
Section titled “Passing a prompt that looks like a flag”Arguments starting with - are treated as options. If your task starts with a dash, pass it after
tapplack start -- so it is not parsed as an option:
tapplack start -- "-not-a-flag is the literal text I want"- Workflows — single vs multi-agent execution.
- Human approval — why a task may stop and wait.
- Runs and artifacts — where the results go.