Skip to content

Document bot-token permission lookup limits in agent guidance #2198

Done

Description

@ifireball

Parent

#478

Related issue

#2196 — Attempt GitHub thread mutations instead of preflighting bot permissions

What to build

Document the GitHub bot-token permission-lookup caveat in the review and fix agent guidance. In particular, a bot viewer's viewerCanResolve or similar preflight result should not be treated as definitive proof that a thread mutation will fail. The post-script owns the API operation and its result; agents should report the post-script outcome rather than infer capability from a permission lookup or ask the PR author to post a closing comment.

If the attempted mutation fails, the guidance should direct the agent to surface the exact thread link and the useful next step, such as manually closing the thread or rerunning the fix with further instructions.

Acceptance criteria

  • GitHub-specific review and fix guidance explains that bot-token permission introspection may be unreliable for thread-resolution capability.
  • The guidance says not to describe a thread as unresolvable solely because a permission lookup returned false; the actual mutation result is authoritative.
  • The guidance directs agents to report the post-script's per-thread outcome, with a working link and next step when an operation fails.
  • The guidance does not ask the human to post a closing comment; manual action is simply to close the thread or rerun the fix with instructions.
  • The wording agrees with the behavior defined in Attempt GitHub thread mutations instead of preflighting bot permissions #2196.

Activity

  1. added
    documentation
    ready-to-code
    on Nov 28, 2026
  2. fullsend-ai-coder commented on Nov 28, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Code · ⚠️ Cancelled · Started 12:56 PM UTC · Ended 12:58 PM UTC

    Commit: 0e5514e · View workflow run →

  3. fullsend-ai-triage commented on Nov 28, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 12:56 PM UTC · Completed 12:58 PM UTC

    Commit: 0e5514e · View workflow run →

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

  4. added
    ready-to-code
    and removed
    ready-to-code
    on Nov 28, 2026
  5. fullsend-ai-triage commented on Nov 28, 2026

    @fullsend-ai-triage

    Thanks for the clarification. This triage now targets AGENTS.md (the guidance agents working on this repo read; CLAUDE.md points to it). It does not target the code, fix or review agents' own skills and definitions. This replaces the file locations suggested in the earlier triage comment.

    Scope: the acceptance criteria stand as written. Add a short GitHub-specific section to AGENTS.md covering the following:

    • Bot-token permission lookups such as viewerCanResolve can be unreliable for thread resolution.
    • A false lookup result alone is not grounds for calling a thread unresolvable. The actual mutation result is authoritative.
    • Agents report the post-script's per-thread outcome. On failure they give a working link to the exact thread and a next step, which is to close it manually or rerun the fix agent with instructions.
    • Nobody is asked to post a closing comment.

    Related work: #2196, which defines the behavior, is now closed as completed. The wording can therefore describe the mutation-is-authoritative behavior as implemented. The existing comments in scripts/lib/github-review-ops.lib.sh and scripts/process-fix-result.py already say the lookup is an unreliable proxy for bot tokens, so use them as a consistency reference. No open PR currently addresses this issue.

    Proposed verification:

    - AGENTS.md has the GitHub thread-mutation guidance described above.
    - It says a false permission lookup is not proof a mutation will fail, and the mutation result is authoritative.
    - It directs reporting the per-thread outcome with a link and next step on failure.
    - It never asks anyone to post a closing comment.
    - pre-commit / make lint pass; wording agrees with #2196.
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
    Previous run

    Triage found this issue ready for implementation. The acceptance criteria are specific, and the work is documentation-only.

    Where the change belongs: the GitHub-specific guidance in skills/pr-review/github/SKILL.md and skills/fix-review/github/SKILL.md. agents/review.md and agents/fix.md may need a short pointer too, since they already say that the post-script owns thread replies and resolves.

    Related work: the behavior this guidance describes is tracked in #2196, which is still open. Describe the intended behavior (the mutation response is authoritative) in terms that match #2196's acceptance criteria. Don't claim it is already implemented. No open PR addresses this issue. The coder status comment shows a run started, but no PR was found when this triage ran.

    Proposed verification:

    - Updated GitHub review/fix guidance says bot-token permission lookups (e.g. viewerCanResolve) are not definitive for thread resolution.
    - It says the actual mutation result is authoritative and that agents report the post-script's per-thread outcome.
    - On failure it directs surfacing the exact thread link plus a next step (close manually or rerun fix with instructions).
    - It does not ask the PR author to post a closing comment.
    - make lint / skillsaw pass; wording agrees with #2196.
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  6. fullsend-ai-coder commented on Nov 28, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ⚠️ Cancelled · Started 12:56 PM UTC · Completed 12:58 PM UTC

    Commit: 0e5514e · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high

  7. fullsend-ai-coder commented on Nov 28, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 1:00 PM UTC · Completed 1:05 PM UTC

    Commit: 0e5514e · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $0.88

  8. self-assigned this
    on Nov 28, 2026
  9. 2 remaining items

  10. added a commit that references this issue on Nov 28, 2026
  11. ifireball commented on Nov 28, 2026

    @ifireball
    MemberAuthor

    /fs-triage I closed the PR previously opened for this because the change was done in a completely wrong place. I meant for the instructions to lands in AGENTS.md or equivalent files that would be used by agent working on tihs very repo, not in the instructions for the codee and fix agent as they work on other repos.

  12. fullsend-ai-triage commented on Nov 28, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 10:40 PM UTC · Completed 10:42 PM UTC

    Commit: df521fd · View workflow run →

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

  13. added
    ready-to-code
    on Nov 28, 2026
  14. fullsend-ai-coder commented on Nov 28, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 10:44 PM UTC · Completed 10:48 PM UTC

    Commit: df521fd · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $0.69

  15. ifireball commented on Nov 30, 2026

    @ifireball
    MemberAuthor

    /fs-triage instruction should not be scoped or limited to thread resolution scenarios, bot permission lookup is unreliable on GitHub in general regardless of the arrempted operation

  16. fullsend-ai-triage commented on Nov 30, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 7:11 AM UTC · Completed 7:12 AM UTC

    Commit: df521fd · View workflow run →

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

  17. added
    pr-open
    and removed
    ready-to-code
    on Nov 30, 2026
  18. fullsend-ai-triage commented on Nov 30, 2026

    @fullsend-ai-triage

    Open PR #2203 already implements this issue by adding a section to AGENTS.md (the repo-local agent guidance, as clarified earlier). It is not a draft.

    Note on your latest comment: the guidance should not be limited to thread resolution. Bot-token permission lookups on GitHub are unreliable for any operation, so agents should attempt the operation and treat its actual result as authoritative. The PR as described is scoped to thread reply/resolve mutations and will likely need to be generalized to meet this. The thread-specific acceptance criteria (report the post-script's per-thread outcome, give a working thread link and next step on failure, never ask for a closing comment) can stay as a concrete example under the broader rule. To get that change made, comment on the PR or use /fs-fix with instructions to widen the scope.

    No second implementation is being dispatched while this PR is open.

    Addressed by:

  19. added a commit that references this issue on Nov 30, 2026
  20. added 2 commits that reference this issue on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationfix-agentpr-openreview-agent

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions