Documentation Docs version: dev (Pre-release: Gitoodo has not been released yet)
GitHub Get notified

For developers · Orchestrator

Triage

On this page
  1. When an issue is triaged
  2. The call
  3. What it writes
  4. What the dispatcher does with it
  5. In the queue
  6. System row and status bar
  7. Status page
  8. Logs

Triage assesses every new, reopened or substantially changed issue once, with one short call to the smallest model of a coding agent the user already has. It sets type, priority and size where nobody set them, records dependencies, asks when information or a decision is missing or the issue looks like a duplicate, and leaves one collapsed note. The dispatcher uses what triage set when it is there and never depends on it: an issue without triage labels is dispatched as before.

Code: crates/core/src/triage/ (output the schema, prompt, fingerprint the hash cache, store the records and budget, plan skip rules, labels and model tiers, agent the call, pass the effects on the forge). The classifier runs a pass per active repository before its reconcile pass (Writer::triage), so a new issue is triaged before the intake marks it ready.

When an issue is triaged#

  • New, reopened or substantially changed. Each issue's text (title and body, without Gitoodo's markers and Depends on lines) has a SHA-256 hash and a small word sketch, stored in triage.json in the state folder. An unchanged hash is never read again. A changed text is triaged again only when less than 80 % of its word triples are the same (a rewritten description, not a typo fix). A closed issue's record is dropped, so a reopened issue is new.
  • Older issues afterwards (#1471). The first pass on a repository reads every open issue as the baseline without a call; issues that come or change afterwards are triaged first. The baseline is then worked through bit by bit: newest first, at most 2 per pass, only after every new issue of the pass is done, only while the agent's usage stays below the user's threshold (dispatch.usage_threshold_percent, 90 % by default) and, under a daily cap the user chose, with at most three quarters of it, so the rest stays for new issues. Issues a person labelled fully or Gitoodo wrote count as checked without a call. Per repository switch "Triage older issues", on by default (repos[].triage_backlog). The progress (backlog in triage.json: checked, left, why it waited, and since when it runs without a pause with how many done then, for the time left) shows as "assessing older issues · 53 of 141 · ~15 min left". Issues the intake keeps as backlog (backlog_for) are left alone.
  • Skipped: pull requests; issues written by workers or Gitoodo (follow-up and part markers, the automation marker); issues a person already labelled fully (a type label or forge issue type and a priority); issues someone works on or that wait (in-progress, in-review, stalled, needs-human, needs-clarification, extern). Busy issues are looked at again once they are free. The legacy prd keeps nobody away any more (#1816): a prd issue without dependencies is triaged like any other, and a large one is split there by its worker.
  • Per repository switch. Repository settings → Workers → "Triage new issues", on by default (orchestration.json → repos[].triage). Triage runs only while the repository's autopilot is on and nothing is paused.
  • No daily cap by default. Triage stops where the workers stop: at the user's usage threshold (dispatch.usage_threshold_percent), for new and older issues alike. A cap is not needed to keep it cheap: each call is a one-shot with the smallest model and a few thousand tokens, and the fingerprint cache never triages an unchanged issue twice, so the calls follow the issues that come or change, not the polls. Three guards stay invisible while nothing goes wrong:
    • Per issue: at most 6 calls per issue and day (ISSUE_CALLS_PER_DAY); an issue that keeps coming back is passed over until tomorrow, the others go on (triage.repeat, once).
    • Runaway: more than 500 calls within an hour (RUNAWAY_CALLS_PER_HOUR) means something loops; triage pauses until the next hour (triage.runaway, once). Only when it trips again for two hours does the status page show it as a fault.
    • Per poll: at most 4 new issues per repository and poll, so a burst spreads over a few polls.
  • Optional cap. AI settings → Advanced → "Triage calls per repository and day": Unlimited (the default), 50, 200, 500 or 1,000 (settings.json → ai.triage.daily_limit, 0 for unlimited, up to 2,000 in the file; daily_limit_set marks the user's choice). Per account three times that. The former defaults of 25 and 200 were never chosen and read as unlimited unless daily_limit_set says otherwise. A retry counts as a call. When a chosen cap is used up the rest waits for the next day (UTC, triage.budget_exhausted, once per repository and day); the system row and the status page say so with the time it goes on and "Change limit".
  • Agent with capacity. The workers' agent first, then the others, each only when installed and not at its usage limit (the dispatcher's usage cache: a lock in force or a window at 100 %). Without one the pass waits (triage.no_agent).
  • Agent that cannot answer (#1407). A call whose agent says it cannot answer any issue now passes that agent over and asks the next one for the same issue in the same pass (triage.passed_over, kept in triage.json → passed_over): not signed in (login, tried again after 15 minutes), at its usage limit (limit, until the reset its message names, else 30 minutes; Gemini CLI reports no usage ahead, so this is how triage learns of its limit), the triage model unknown or not allowed for the login (model, an hour, at once with another model chosen) or a CLI without an option of the call (unsupported, an hour). The cause is read from the agent's own error (its JSON output or stderr), never logged or kept as text. When every installed agent is passed over, the pass waits: at their limits like any agent at its limit, otherwise the status page names the cause and the agent ("Codex is not signed in …"). Any other failure (timeout, an unknown error, an output that is no answer) passes no agent over: the pass stops and the issue comes again on the next poll.
  • Never starved (#1426, #1471). Triage takes no worker slot: a call is a short model call of the classifier without a working copy, so it never waits behind the workers, and the resolver's system slots stay the resolver's. Passes of all repositories and accounts run one after the other in one process (one call at a time), before each repository's reconcile pass, new issues oldest first. The usage threshold and a cap the user chose are the only things that hold it, and both show.
  • State that does not save. Before each call the pass saves triage.json; when that fails (a full disk) it makes no call (triage.write_failed, step=store): a call whose result is not remembered would be made again, with a second note. What did not save is kept in the process and written with the next save.
  • Rewritten during the call. When a person changes the issue's text substantially while its call runs, nothing is written from the answer (triage.edited); the new text is triaged on the next pass. A label a person set in the meantime wins: triage only sets what is still unset.

The call#

One non-interactive call with no tools, no MCP servers, no session saved and no repository access (a temporary empty folder as working directory), under the agent's own sign-in:

AgentDefault modelHow
Claude Codehaikuclaude -p --output-format json --tools "" with its own short system prompt
Codexnewest lunacodex exec --ephemeral --ignore-user-config -s read-only --json, prompt on stdin
Gemini CLIflash-litegemini --output-format json, prompt on stdin

The model per agent is a setting (Settings → AI assist → Advanced → "Triage of new issues"); an empty or unknown value runs the smallest. The call times out after 90 seconds. Calls run one at a time on the dispatcher's computer and take no worker slot (#1426): a call is a short model call without a working copy, so it never waits behind running workers and starts as soon as the classifier gets to the issue, also right after the start (resolver.md, "System slots").

Input, fenced as data the model must never follow: the title and body (cut at 6,000 characters, about 1,500 tokens), up to 60 other open issues as number and title (newest first), up to 80 label names of the repository, the language to write the free-text fields in (the repository's language on the forge), and the machines workers run on (up to 8): name, system, whether it answers, the agent CLIs ready there and whether workers may use its desktop. The dispatcher, which polls the machines, writes them to worker-machines.json in the state folder when they change; before it has, triage takes this computer and the machines whose system was seen at setup from the configuration (triage::machines).

Output is one JSON object, checked against a strict schema (unknown fields are refused):

FieldValues
typebug, feature, chore, docs, question
priorityp0 … p3, with priority_reason (one sentence)
sizeS, M, L
depends_onopen issue numbers from the list, only when sure (at most 5)
duplicateof, confidence, one-line summaries of both, what overlaps and what differs; or null
readinessready or needs_decision (with 1–3 questions; each may name the device it is about)
worker_decidestechnical choices the worker makes itself, 0–4 lines

An invalid answer gets one retry with the reason (never the answer itself). A second invalid answer ends triage for this text silently: nothing is written to the forge, the record says failed and triage.failed is logged. The same text is not tried again; an edit is.

Measured with Claude Haiku on the dev Forgejo: about 1,900 input tokens (part of it cached) and 420 output tokens per issue, about US$0.0004 per issue and 5 seconds per call.

What it writes#

  • Labels only where no person set one. Per dimension (type, priority, size): a label a person set wins and triage leaves that dimension alone; a label triage set earlier is replaced when the new assessment differs; a triage label a person removed is not set again. Triage remembers the labels it set (triage.json), so a later change by a person always wins. It reuses the repository's own names (bug, Kind/Bug, priority:p1) and creates missing type:…, priority:p… and size:… labels.
  • Dependencies through blocked::record_dependency(…, Source::Triage): a Depends on #N line in the description, a note "Gitoodo's triage found that this issue cannot start before then", and blocked. The classifier makes it ready once the named issues are closed (dispatcher.md, "Dependencies").
  • Questions in the question format (docs/question-format.md), kind clarification, ids triage-info-…, triage-decision-… and triage-dup-…, addressed to the repository's human (else the author), and needs-human, which holds the issue back from the dispatcher until it is answered. Questions go only to issues of trusted authors (the repository's human or a collaborator with write access); a stranger's issue first goes through the intake's approval.
    • needs_decision: only what a person alone can decide (product, priority or scope, access they control, a trade-off users notice). Each question is checked before it is asked (#1566): it ends in ?, says why it matters (a context line), and has 2–4 options each with its consequence plus a recommendation, or names exactly the one value it needs (a URL, an account), asked as text. An open "what is missing" or "more information" question is never asked, in any language; any other question that fails the check, and every detail the model called missing (the earlier needs_info), goes to the worker. When no question is left, the issue is ready.
    • Technical details (tool versions to test, formats, test steps) are never a reason to wait: the note lists them as "The worker decides: …", so the worker and every reader see them.
    • A check on a real machine (a test on Windows, macOS or Linux, also in a native app) is a worker's job wherever a worker machine runs that system, also one offline right now: the prompt lists the machines, and a question whose device names such a system goes to the worker and leads its decisions. Only a check no machine can do is asked.
    • Duplicate, only at high confidence and with both summaries, the overlap and the difference, so the question stands on its own: "Duplicate – close #new, refer to #old", "Not a duplicate – both stay open, #new goes to a worker", "Merge – #old gets the content of #new, #new is closed". Without these parts the finding is dropped. The answer is applied by triage itself on the next poll (triage.duplicate_answered): close with a comment, or quote the content on the older issue and close.
  • One note per triage, a collapsed <details> with type, priority, size, the reason, the readiness, dependencies and the labels set, marked as written by Gitoodo.

Forge writes hold the daemon writer's lock; the model call does not, so workers never wait for a model. Before writing, the issue is read again: one that was closed or taken meanwhile is left.

What the dispatcher does with it#

  • Priority orders the queue as it always did (priority:p0 first, read_model score); an issue without one counts as normal.
  • Size S takes a smaller worker model. A worker for an issue labelled size:s runs one model tier below the chosen worker model: Opus → Sonnet, Gemini Pro → Flash, for Codex astra → sol → terra of the same version where the CLI lists it (gpt-6-astra → gpt-6-sol, gpt-6.1-sol → gpt-6.1-terra). A model without a smaller tier and the agent's own default stay as they are. Logged as dispatch.small_task_model. Switch it off under Settings → AI assist → Advanced → "Small tasks on a smaller model" (ai.triage.small_task_model). A resumed or handed-over run keeps the model it started with.
  • Questions hold the issue: needs-human keeps it out of the queue until the answer.
  • Type is not used for routing; there is no rule that would need it.

In the queue#

The issues triage still has in its line show first in the queue beside the sessions, in its order, tinted in triage's blue (--color-kind-triage; the resolver has violet, workers stay neutral) with the "Triage" marker, icon and name. Each pass keeps the line per repository in triage.json (pending, oldest first, with the time of the pass); the read model carries the place as triage_waiting while the issue is free (no lease, not stuck). A line older than 15 minutes (PENDING_FRESH_SECS, triage switched off or paused) shows nothing.

System row and status bar#

Triage runs no session, so it shows as one calm line of its own above the sessions of a repository or of all of them, tinted like its queue entries, with one sentence for its state:

  • Older issues: "Triage · assessing older issues · 53 of 141 · ~15 min left", with a thin progress bar along the line. The time left comes from the run's pace since it last paused for a reason of its own (usage, a cap, a fault) and shows once at least 3 issues and 2 minutes give an honest estimate.
  • New issues: "Triage · assessing new issues: #1512" while a call runs on one.
  • Waiting: one plain sentence with the reason and when it goes on: "waits until your usage is below your threshold again", or for a chosen cap "paused, your daily limit is reached: continues tomorrow from 01:00" with "Change limit", which opens the AI settings at the limit. Only a cap gets the action; the threshold is the workers' own.
  • Idle, or held by something the user cannot act on there (no agent, the runaway guard): no line. A fault shows on the status page once it lasts.

The day's calls stand only in the tooltip. The status bar says the same in short ("Triage: older issues 53 of 141", "Triage: web #1512", "Triage: daily limit reached") and nothing otherwise. Both read triage_status (its current from the call mark triage-call, its triage detail per repository: calls today, a chosen cap, used up, waiting, why they wait, since when the line's first issue is first, the older issues), polled once for both every 10 seconds.

Status page#

Triage has its own line on the status page, after the workers, read from triage.json (its pulse, crates/core/src/step_status.rs) by the app command triage_status:

StateWhen
RunningA call runs, or one ended in the last 10 minutes: "Working on web #812 · 2 waiting"
ReadySwitched on, nothing runs; issues that merely wait say so ("2 waiting") but are not "running"
OffSwitched off in every repository whose autopilot is on; not a problem, "All running" holds
Needs youA cap the user chose is used up in every repository where issues wait: "issues are assessed again from 01:00", with "Change limit"
DisturbedNo coding agent installed (no small model), calls failed twice in a row (every installed agent passed over for a cause the person must fix names it and the agent), or the line's first issue has not moved for more than 10 minutes with nothing else to explain it (then "Restart" restarts the background service). Counts like every other problem in "All running" and the header

An agent at its usage limit or above the threshold is no fault: triage waits for it and the line says so. The runaway guard shows as a fault only after it tripped for two hours in a row. The next triaged issue clears a fault. The shape (StepStatus: on, last issue, waiting, fault) is the same for every background step; another step adds an entry to STEP_IDS in src/views/status/model.ts and its reader. The resolver's line says when its waiting attempts wait for a free worker slot.

Logs#

triage.* events, with the issue key, agent, model and token counts, never the issue text or the model's answer: see docs/logging.md, "Triage".

Edit on GitHubDocs version: dev