Skip to content

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.

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.

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:

Terminal window
tapplack start --force "summarize the files in workspace"

Use --force when you know the request is work but the wording is terse.

For a task, the orchestrator:

  1. Creates runs/<run-id>/.
  2. Runs the configured agent or pipeline (see Workflows).
  3. Streams tool activity and file changes to the session.
  4. Writes per-stage artifacts and FINAL.md.
  5. Writes run.json with totals, timings, and incidents.
  6. Prints a summary with token usage and the output path.

The run directory layout is documented in Runs and artifacts.

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.

Two retry layers exist:

  • Provider retries — a 429, 5xx, or timeout is retried on the same provider with exponential backoff, controlled by retryAttempts, retryBaseDelayMs, and retryMaxDelayMs.
  • Provider fallback — when the retries are exhausted, the next provider in the agent’s fallback chain 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.

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.

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.

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.

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:

Terminal window
tapplack start -- "-not-a-flag is the literal text I want"