New to FORGE? Start a free 30-day trial

Auto-Routing Issues to Workflows

Updated on Oct 1, 2026

Forge can classify an issue and select which built-in workflow should handle it, instead of you choosing a workflow by hand. A single model call reads the issue and decides whether it is actionable, how large the change is, and — if it fits — which workflow to run.

How it works

  1. Forge reads the issue set in your current context (frg config set-issue <ID>).
  2. It sends the issue to your project's default coding agent, pinned to the model configured in [routing], along with the list of candidate workflows.
  3. The agent returns a decision: whether the issue is actionable, its magnitude (trivial, standard, or large), and — if actionable and not too large — the best-fitting workflow (and, occasionally, a close second choice).
  4. Forge turns that decision into one of three outcomes:
    • Workflow selected — runs (or reports, in a dry run) the chosen workflow.
    • Split recommended — magnitude is large; Forge recommends frg issue split and does not run anything.
    • Needs clarification — the issue is not confidently actionable; Forge does not run anything.

Candidate workflows

Only workflows that require nothing but an Issue ID are offered to the classifier. In the built-in workflow set, that is:

  • quick-fix-to-pr
  • code-to-review
  • issue-to-pr-lite
  • issue-to-pr
  • pr-create-publish
  • pr-to-merge

Workflows that require a PR ID or a Ticket ID (for example pr-review-merge, ticket-to-response) are never candidates. A workflow disabled with frg workflow disable <name> is also excluded from the candidate list. Custom workflows you add under .forge/config/workflows/ become candidates automatically if they declare required_context = ["issue_id"] and are enabled.

Configuration

Auto-routing is controlled by the [routing] table in .forge/config/project.toml:

toml
[routing]
enabled = true                # default: true
model = "claude-haiku-4.5"    # default: "claude-haiku-4.5"
  • enabled: turns frg workflow classify and frg workflow run --auto on or off for the project. Both commands fail with Routing is disabled for this project (set [routing].enabled = true in project.toml to use 'frg workflow classify' / 'frg workflow run --auto'). when this is false.
  • model: the model used for the classification call only. It does not change the model used by the workflow that ends up running.

Both fields are optional; the defaults above apply if you omit the table entirely.

Usage

Dry run: frg workflow classify

Classifies the current issue and prints the decision without running anything. This subcommand is not listed in frg workflow --help, but it works like any other workflow command.

bash
frg config set-issue 1080
frg workflow classify
text
Routing Decision (dry run — nothing executed)
✓ Selected workflow: issue-to-pr (2.1s)
→ Rationale: Standard-sized feature request with a clear implementation path; the full review cycle fits.

If the classifier was torn between two workflows, the output also includes an Also considered line with the second candidate.

Run automatically: frg workflow run --auto

Classifies the issue, confirms the choice, and runs the selected workflow — instead of naming a workflow yourself.

bash
frg config set-issue 1080
frg workflow run --auto

With a single confident choice, Forge asks for confirmation before running:

text
Classifier selected: issue-to-pr (2.1s)
Run it? [Y/n]:

When the classifier is genuinely torn between two candidates, it offers both:

text
Classifier is torn between two workflows (2.1s):
  [1] issue-to-pr
  [2] issue-to-pr-lite
Choice [1/2]:

Add --bypass-approvals to accept the classifier's top choice without a prompt, for CI and other non-interactive contexts:

bash
frg workflow run --auto --bypass-approvals

Without --bypass-approvals, running in a non-interactive environment (no terminal, or stdin closed) fails instead of hanging:

text
Interactive confirmation requires visible output. Use --bypass-approvals in quiet/non-interactive contexts.

If the classifier recommends a split or cannot confidently act on the issue, frg workflow run --auto stops without running anything:

text
Aborted — no workflow selected to run (declined, needs clarification, or recommends a split).

Prerequisites

  • A valid Telerik license and a configured AI coding agent, same as any other workflow command.
  • An issue set in context: frg config set-issue <ID>.
  • [routing].enabled not set to false in .forge/config/project.toml.

Troubleshooting

Routing is disabled for this project (set [routing].enabled = true in project.toml to use 'frg workflow classify' / 'frg workflow run --auto'). Set [routing] enabled = true in .forge/config/project.toml, or remove the [routing] table to use the default.

Routing requires issue context. Set with: frg config --issue <ID> (from frg workflow classify) or Auto-routing requires issue context. Set with: frg config --issue <ID> (from frg workflow run --auto) Set an issue first: frg config set-issue <ID>.

Interactive confirmation requires visible output. Use --bypass-approvals in quiet/non-interactive contexts. or Interactive confirmation requires user input. EOF detected — cannot proceed in non-interactive environment. Use --bypass-approvals to skip. Add --bypass-approvals when running frg workflow run --auto outside an interactive terminal, such as in CI.

See Also