Skip to content

Fix Agent

Fix agent icon

Review-feedback specialist that reads review comments on open PRs, implements targeted fixes, runs tests and linters, and commits the result.

How the agent works

The fix agent is triggered when the review agent requests changes or when a human issues a /fs-fix command on a PR. It follows the same sandboxed pipeline as the code agent.

  1. Pre-script validates inputs and checks the iteration cap (preventing infinite fix loops).
  2. Sandbox — the agent reads each review finding, implements targeted fixes, and verifies them against tests and linters.
  3. Validation loop — the output is checked against a schema, with up to 2 retry iterations if the output is malformed.
  4. Post-script pushes the commit and posts a summary comment on the PR.

What the agent reads

The fix agent has two operating modes with different primary inputs:

Bot-triggered (review agent requests changes):

InputSourceHow it gets there
Review bodyLatest CHANGES_REQUESTED review from the review botPre-fetched on the runner before the sandbox starts, injected as review-body.txt
PR diffgh pr diff inside the sandboxAgent calls this to understand what code changed
Repository checkoutFull repo at PR HEADChecked out on the runner, mounted into the sandbox
Repo conventionsAGENTS.md, CLAUDE.md, CONTRIBUTING.mdRead from the checkout inside the sandbox

Human-triggered (/fs-fix [instruction]):

InputSourceHow it gets there
Human instructionFree text after /fs-fix in the commentExtracted by the workflow, passed as HUMAN_INSTRUCTION env var (up to 10,000 bytes)
PR diffgh pr diff inside the sandboxSame as bot-triggered
Repository checkoutFull repo at PR HEADSame as bot-triggered
Repo conventionsAGENTS.md, CLAUDE.md, CONTRIBUTING.mdSame as bot-triggered
Review body (if any)Prior review bot CHANGES_REQUESTED reviewStill injected as review-body.txt, but human instruction takes precedence

When a human instruction is present, it supersedes the review body as the primary directive.

What the agent does not read

This is worth being explicit about, because the fix agent's scope is narrower than you might expect:

  • Inline PR review comments. The agent reads the consolidated review body, not individual line-level comments. If you need the agent to act on a specific inline comment, copy the relevant text into a /fs-fix instruction.
  • Other PR comments. General discussion comments on the PR are not part of the agent's context. Only the review body and the /fs-fix instruction are read.
  • CI logs and check status. The fix agent does not read GitHub Actions logs, check run output, or merge readiness indicators. It addresses review feedback, not CI failures. (The code agent handles CI failures during implementation.)
  • Issue body. The fix agent does not read the linked issue. It operates purely on the PR and review context.

The /fs-fix instruction text can contain URLs. Whether the agent can use them depends on where the URL points:

URL typeWorks?Why
Same-repo issue or PR (#123 or full GitHub URL)YesAgent resolves via gh CLI through the GitHub API
Same-repo file or commitYesSame mechanism — GitHub API via minted token
Cross-repo GitHub URLNoMinted token is scoped to the target repo only
GitHub GistNogist.github.com is not routable through the sandbox proxy
External URL (docs, pastebins, etc.)NoSandbox proxy blocks all non-API HTTP egress (403 Forbidden)

GitHub may auto-shorten same-repo URLs in rendered comments (e.g., https://github.com/org/repo/issues/2 becomes #2), but the dispatch pipeline reads the raw comment body, so the full URL is preserved in the instruction text either way.

If you need the agent to act on external context, paste the relevant content directly into the /fs-fix comment rather than linking to it. The instruction supports multi-line text (up to 10,000 bytes).

Iteration limits

The fix agent enforces iteration caps to prevent infinite review-fix loops:

  • Bot-triggered: up to 5 iterations per PR (configurable).
  • Human-triggered: up to 10 total iterations per PR (configurable), shared across bot and human triggers.
  • When a bot-triggered run is approaching the bot cap, the agent applies the needs-human label.
  • Each /fs-fix comment cancels any in-flight fix run for the same PR and starts a new one.

How it helps

  • Review feedback is addressed quickly — often before the reviewer checks back.
  • Fixes are scoped to exactly what the review requested, reducing churn.
  • The iteration cap prevents the fix and review agents from looping indefinitely.

Commands

CommandWhereEffect
/fs-fixPR commentTriggers the fix agent on the PR
/fs-fix-stopPR commentDisables the fix agent for this PR

Requires write-level repository permission (admin, maintain, or write).

The /fs-fix command accepts optional free-text instructions after the command. The text is passed to the agent as a human instruction, giving you direct control over what to fix:

  • /fs-fix — fix whatever the review agent flagged
  • /fs-fix you forgot to update the docs here
  • /fs-fix the error handling in processItem needs to distinguish between retryable and fatal errors
  • /fs-fix address the concern raised in #42 — same-repo references work (details)

The fix agent also triggers automatically when the review agent submits a "changes requested" review on a same-repo PR (fork PRs are blocked).

/fs-fix-stop adds the fullsend-no-fix label to the PR, preventing any further bot-triggered fix runs. Human-triggered /fs-fix commands still work. Remove the label or use /fs-fix to re-engage.

Control labels

LabelMeaning
fullsend-no-fixPrevents bot-triggered fix runs on this PR. Applied by /fs-fix-stop. Human /fs-fix commands are unaffected.
needs-humanThe fix agent is approaching its iteration cap and needs human direction. Applied automatically when a bot-triggered fix iteration reaches the warning threshold.

Configuration and extension

See Customizing with AGENTS.md and Customizing with Skills.

Variables

None.

Source

internal/scaffold/fullsend-repo/harness/fix.yaml