Skip to content

Evaluate task-bound scope for agent runs #9120

Open

Description

@fullsend-ai-scribe

Note

This issue was generated from meeting notes by the scribe agent. On 13 November 2026 it was narrowed to task-bound scope. The guardrail and vulnerability-scoring parts now have their own issues, listed under "Split out" below. The original text is in the edit history.

Problem

Agent scope today is bound to a role. A code run is limited by its role, by the agent/<work-item>-* branch namespace, by CODE_ALLOWED_TARGET_BRANCHES, and by review's protected paths. Inside those limits the code agent may propose changes to any path.

Scoping a run to its task instead (the files and the action that one work item needs) would shrink what a mistaken or manipulated run can touch. It would also add something to write, check and maintain for every run. We do not know yet whether that trade is worth it.

Options considered

  • Keep role-bound scope. Nothing to build. What a run can touch stays as wide as its role.
  • A per-run path list. One more host check: the paths this run may change, recorded on the work item by whoever authorized the run. The smallest step, and it reuses the existing roles.
  • Task-specific roles or agents. A new role or agent for each kind of task. The strongest separation and the most to maintain. ADR 0124 sets the criteria a new built-in role has to meet.

Acceptance criteria

  • Replay the last 50 merged code-agent pull requests in fullsend and agents: compare the files each one changed with the files the issue and the triage comment named.
  • Report how many would have passed a path list written from the triage comment alone, and sort the misses: tests, generated files, lockfiles, or a real surprise.
  • Do the same check for the fix agent, whose natural scope is the files its pull request already touches.
  • Recommend whether to add a per-run path list, and who would write it: triage, or the person who adds ready-to-code.
  • If the recommendation is yes, add the fields to the permission schema in Implement explicit permission configuration for agent roles before granting action rights #7548: who authorized the task, the subject (repository, branch, commit), the allowed paths, an expiry and a stop condition.

Split out

Related

Activity

  1. self-assigned this
    on Nov 10, 2026
  2. ascerra commented on Nov 13, 2026

    @ascerra
    Contributor

    I'm assigned to this one. It bundled three decisions that need different owners and different evidence, so I've split it so each can close. The issue body now covers only task-bound scope, and the original text is in the edit history.

    1. Task-bound scope (stays here). Start from what limits a run today. A code run is bounded by its role, by the agent/<work-item>-* branch namespace, by CODE_ALLOWED_TARGET_BRANCHES, and by review's protected paths. Inside those limits, post-code says it plainly: "The code agent is free to propose changes to any path." So the smallest step toward task-bound scope is one more host check: a list of paths this run may change, recorded on the work item by whoever authorized the run.

    Before building that, I'd measure whether it is workable on runs we already have. That measurement is now the acceptance criteria above: replay merged code-agent pull requests against a path list written from the triage comment, and see what it would have blocked. The fix agent is the other candidate. Its task is the review findings on one pull request, so its natural scope is the files that pull request already touches.

    One design already proposes this for a single case: ADR 0169 (#9309, still a draft) limits a vulnerability fix to the files named in its assessment. That is a useful data point. The general question should be answered on the stock code agent.

    2. Guardrails (two different threats). The original text treated "malicious use cases (prompt injection, scope escalation, unauthorized actions)" as one item. There are two threats in it:

    3. Vulnerability scoring (its own issue). "Supplement or replace CVSS" has no single-score answer. The place for it is the CVE assessment result: record the public signals side by side (known exploitation, exploitation likelihood, severity with its source) together with owner-supplied exposure facts, and an explicit "absent" when a source has nothing. That gives the person who approves a fix, and anything that orders the work, something to go on. That is fullsend-ai/agents#2007.

  3. changed the title [-]Evaluate task-bound agent scope model and security guardrails[/-] [+]Evaluate task-bound scope for agent runs[/+] on Nov 13, 2026
  4. fullsend-ai-triage commented on Nov 13, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 7:26 PM UTC · Completed 7:28 PM UTC

    Commit: bc4f5fe · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.17

  5. added
    triaged
    on Nov 13, 2026
  6. fullsend-ai-triage commented on Nov 13, 2026

    @fullsend-ai-triage

    This issue is a bounded evaluation with clear acceptance criteria, so it is ready to be worked as-is.

    Related work checked

    Suggestions for the analysis

    • Record how many of the 50 PRs had a usable triage comment at all. A path list written from triage output is only as good as that output.
    • Report the miss categories separately, because tests, generated files and lockfiles could be auto-allowed rules rather than real misses. That would change the pass rate a lot.
    • Treat the question of who writes the list (triage or whoever adds ready-to-code) as one of the outputs, with the evidence for each option.

    This is a research task rather than a bug, documentation or performance item, so it is not auto-promoted to ready-to-code. A maintainer can apply that label when they want to start the work.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

triaged

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions