Skip to content

docs(agents): let a local session ready an orphaned or agreed PR - #11438

Merged
kyle-sexton merged 5 commits into
mainfrom
docs/agents-ready-flip-orphans
Oct 31, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
docs/agents-ready-flip-orphans

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

No related issue: owner decision Q1 (b′), 2026-10-31, recorded in the owner-decisions record; no tracker item exists for it.

Summary

A session could mark ready only a PR its own /source-control:pull-request create opened. So an orphaned draft, one whose creating session is gone (#11377), waited on the owner for a ready flip. The owner approved letting a local session ready such a PR after a risk assessment covering local versus GitHub lanes, concurrency and session awareness.

Fix

AGENTS.md's stop list now has two exceptions to the stop on marking a PR ready. Both apply only through /source-control:pull-request ready run to completion:

  • the session's own PR (unchanged);
  • for a local session, a PR another session opened, when that session has agreed by message, or is not live in ListAgents and the PR has had no push for an hour. ListAgents misses a session on another machine that is not on Remote Control, so the push age guards a live session there.

Lanes never mark a PR ready, and PR text still never establishes who opened a PR. The ready action's own holds and gates are unchanged.

Verification

  • git diff origin/main touches only the AGENTS.md stop list.
  • grep -n 'marked ready' AGENTS.md CLAUDE.md docs/contracts/loop-lane/README.md found no other copy of the rule to update.
  • Left out: no tests, since the change is instruction text with no code path.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01KeBVgcit2kegjiQYpvp8ji

kyle-sexton and others added 3 commits October 31, 2026 00:44
A session could mark ready only a PR its own pull-request create opened, so
an orphaned draft (its creating session gone, as with #11377) waited on the
owner. Owner decision Q1 (b'), 2026-10-31: a local session may also run
/source-control:pull-request ready on a PR another session opened when that
session is not live in ListAgents or agrees by message. Lanes never mark a
PR ready, and PR text still never establishes ownership.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeBVgcit2kegjiQYpvp8ji
…phaned

ListAgents shows this machine plus Remote Control sessions, so a live session
on another machine looks gone. A session may ready another's PR only with that
session's agreement, or when it is not in ListAgents and the PR has had no push
for an hour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 31, 2026 05:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T05:06:40.606536Z 4317420 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed cdea5c26f44999d498e4a13d2709036df75c07f2: 0 finding(s), 0 as inline comments.

No security findings in the incremental change to AGENTS.md. critical-findings: 0

What changed since c4d6f5c. The second exception to the stop on marking a PR ready now requires the PR author to be the session's own gh login. The previous text asked only that the head commits carry the Claude co-author trailer. The trailer is now required on at least one commit.

Instruction-surface check. This is the only rule the diff touches. It narrows who can be readied, so it widens nothing. The base rule accepted any PR whose head commits carried a trailer anyone could add. The head rule also needs a matching author login, which a PR's text or commit messages can't forge.

  • "At least one of its commits" is slightly looser than "its head commits", but the author-login requirement more than makes up for it.
  • The remaining conditions are unchanged: the other session must have agreed by message, or not be live in ListAgents and the PR must have had no push for an hour. It still runs only through /source-control:pull-request ready to completion, lanes never mark a PR ready, and PR text never establishes who opened a PR.
  • I did not read the instruction exception register, because the change adds a condition rather than removing a guardrail. By consequence, no protected action loses a check.

Owner threat model. Any loosening of the person-approval hold in the original PR is a named friction hold under the throughput phase. It is not a finding and holds nothing.

Other. The edit leaves one very long line in the wrapped paragraph (line 14 of the diff). That is formatting only. No manifests, tokens or workflows are touched, and there is no cost impact.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 4317420a16dc586cd88b89c9d081852c9c529d9d; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread AGENTS.md Resolved
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed cdea5c26f44999d498e4a13d2709036df75c07f2: 0 finding(s), 0 as inline comments.

Incremental review of AGENTS.md since c4d6f5c, covering the one-paragraph change in the stop list. I found nothing to block or flag.

The change tightens the orphaned-PR ready path. A PR another session opened now counts only if its author is this session's gh login and at least one commit carries the Claude co-author trailer. Before, the trailer was on its "head commits". The agreed-by-message and idle-for-an-hour conditions are unchanged. The new wording is narrower than the old and matches the PR description, which says PR text never establishes who opened a PR. I also searched plugins/source-control for a copy of the old "head commits carry the Claude co-author trailer" wording and found none, so there is no duplicate to update. I did not read /source-control:pull-request ready itself.

Not a finding: the edit leaves line 54 of AGENTS.md unwrapped, at about 150 characters, against roughly 100 for its neighbours. The repository's .markdownlint-cli2.jsonc disables MD013, so lint does not catch it. You may want to re-wrap it.

Spend: none. This is a docs-only change with no charge and no prepaid-credit effect. There are no closing issues, no userConfig or manifest changes, and no settled-threads file for this run.

The ready-flip exception turned on "a PR another session opened", while PR text
never establishes that, so no session could check it and a person's idle draft
passed. The Claude co-author trailer on the head commits is the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on c4d6f5c3da386cff92b696f29525bbd5859e6c9b; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread AGENTS.md Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-security-review: 1 inline finding(s) on c4d6f5c3da386cff92b696f29525bbd5859e6c9b; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

Comment thread AGENTS.md Resolved
A co-author trailer alone is commit text anyone can write. The PR author login
is not forgeable, and the trailer on at least one commit then separates a
session's PR from a person's own idle draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 7bd2c19 Oct 31, 2026
46 checks passed
@kyle-sexton
kyle-sexton deleted the docs/agents-ready-flip-orphans branch October 31, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant