Skip to content

Have agent sessions re-check for comments before finishing - #60

Merged
d-morrison merged 2 commits into
mainfrom
claude/fix-41-check-comments-before-ending
Sep 15, 2026
Merged

d-morrison merged 2 commits into
mainfrom
claude/fix-41-check-comments-before-ending

Conversation

@d-morrison

@d-morrison d-morrison commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Closes #41.

Was stacked on #58 and #57, both now merged (112cd83, 2b325ff). This retargeted to main, and main was merged in to resolve the divergence #57's squash created. The diff is this PR's own 2 files.

The problem

A session can run long enough that new comments arrive while it works, and nothing delivers them to the agent. An agent that finishes without looking again simply misses them — a review, a correction, or a change of direction lands after it stopped reading.

Where the rule goes

The issue asks for both agent surfaces this repo uses, so each gets it in its own idiom:

Surface Mechanism
Claude sessions prompt-addendum in .github/workflows/claude.yml
Copilot agent sessions .github/copilot-instructions.md

prompt-addendum is the input gha provides for precisely this — its description reads "Repo-specific instructions appended to Claude's prompt (e.g. the pre-commit checklist)". Using it means no new file, and the instruction sits in the workflow where someone configuring the agent will actually look. Each half names the other, so the two don't silently drift apart.

The wording asks for the same disposition on a late comment as on one present from the start: action it, or reply saying why not, and don't finish while something is unanswered.

Scope note

claude-code-review.yml is deliberately left alone. It posts a review and exits rather than holding a session open, so there's no window for a comment to arrive mid-run and be missed. Adding the instruction there would be noise.

Verification

  • Workflow YAML parses; claude.yml's existing install-quarto / checkout-submodules inputs intact
  • All 21 workflows parse, and Set a time limit on every job this repo defines #58's timeout caps survived the base merge with no violations
  • The added prose passes all three of this repo's prose gates — semantic line breaks, list-item splices, and non-standard characters — each run locally with CI's own configuration and base ref before pushing

That last point is deliberate. #58's first push went red on two of those three gates; this one was written to them from the start and checked before it left my hands.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lx1hhHu58mXq9DfJsAxkHn

Closes #41.

A session can run long enough that new comments arrive while it works, and
nothing delivers them to the agent; an agent that finishes without looking
again simply misses them. The issue asks for the check on both agent surfaces
this repo uses.

For Claude sessions, the rule goes in claude.yml's prompt-addendum, which is
the input gha provides for exactly this ("Repo-specific instructions appended
to Claude's prompt"). No new file, and it sits in the workflow where someone
configuring the agent will see it.

For Copilot agent sessions, the same rule goes in copilot-instructions.md,
which is the file those sessions read. Each half names the other so the two do
not drift apart.

The wording asks for the same disposition on a late comment as on one present
at the start: action it, or reply saying why not, and do not finish while
something is unanswered.

Scope note: claude-code-review.yml is left alone. It posts a review and exits
rather than holding a session open, so there is no window for a comment to
arrive mid-run and be missed.

Verified: workflow YAML parses and the existing inputs are intact; the added
prose passes gha's semantic-line-break, list-item-splice and
non-standard-character checks, all three run locally with CI's configuration
before pushing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx1hhHu58mXq9DfJsAxkHn
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Claude finished reviewView run


Confirmed: gh api is denied in this session (as stated in the task setup) and scripts/check-pr-fully-clean.py does not exist in this repo, so I cannot run the exhaustive check-runs instrument the hook wants. I'll caveat the CI claim accordingly, matching how the prior review round handled this same constraint.

Stopping Point: Clean stopping point reached — review complete, no further action queued.

Revised closing, with the CI claim scoped to what I could actually verify:

Caveat on CI: gh api is disallowed in this session and scripts/check-pr-fully-clean.py is not present in this repo, so I could not run the exhaustive paginated check-runs instrument that would authorize a terminal "CI fully clean" claim. My CI observation is from gh pr checks only: at review time all substantive jobs (lint-workflows, check-ai-tells, CodeQL, lint-markdown, check-secrets, check-new-line-breaks, check-typos, copilot-setup-steps, check-chars, lint-qmd, link-checker, Analyze, check-junk-files, lint-yaml, lint-project, review/gather-context, review/preempt-previous) showed pass, with Spellcheck, build-deploy, check/check-dois, and review/claude-review still pending — no failures observed, but this is not an exhaustive-instrument confirmation. My "Ready for merge" verdict below is a code-review judgment (diff content, prior-round diff, lab-manual conventions), not a CI-clean claim.

Verdict

Ready for merge (code-review basis only; CI observed via gh pr checks showed no failures but several checks pending, and I could not run the exhaustive check-runs instrument in this session, so this is not a claim that CI is fully green)

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "78f581c27753dc2bfbd838cee0ad6dbdef75c4a9",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "Re-checked claude.yml prompt-addendum block scalar and copilot-instructions.md Agent Sessions section for syntax and heading-level consistency; diff against previously-reviewed commit a52d08b7 is empty for both files, confirming no regression was introduced by the intervening merge commits.",
  "holistic_assessment": "Change still closes issue 41, still matches lab-manual list and heading conventions; CI checked via gh pr checks only (no exhaustive check-runs instrument available), so full CI rollup remains unverified this session."
}

Reviewed commit: 4d1105b

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $0.2636 (review) — run

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-15 02:29 UTC

@d-morrison
d-morrison merged commit bae2619 into main Sep 15, 2026
25 checks passed
@d-morrison
d-morrison deleted the claude/fix-41-check-comments-before-ending branch September 15, 2026 02:27
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.

check for additional comments before ending agent sessions

3 participants