Skip to content

docs(agents): make the os-dev termination contract explicit and honest about its measured failure rate (#6586) - #6740

Merged
os-project-manager merged 1 commit into
mainfrom
claude/issue-6586-dev-termination-contract
Aug 8, 2026
Merged

docs(agents): make the os-dev termination contract explicit and honest about its measured failure rate (#6586)#6740
os-project-manager merged 1 commit into
mainfrom
claude/issue-6586-dev-termination-contract

Conversation

@os-project-manager

Copy link
Copy Markdown
Collaborator

Fixes #6586

What this changes

One file: .claude/agents/os-dev.md. Three edits, all in the dev agent's own operating manual.

1. A new "Terminating cleanly" section, placed directly after the Definition of done list, because termination is the last step of that order. It states:

  • The structured report is the terminal action — push, draft PR, skip-changeset, the foreground CI-convergence read, then the JSON, and nothing of the dev's runs after it.
  • A monitor is bound to its own deadline, never to its subject's lifetime. Cancel a watched process, cancel its monitor in the same step; finish reading a run's output, its monitor is finished too. The measured case is publish/lint 面对字面量空组合子响亮拒收 —— #5322 拍板单位元后的可选编写期信号(PD #12 形状) #5330 / PR feat(lint): refuse literal empty combinators at authoring time (#5330) #6703: one card emitted six notifications, five redundant replays of the same full report, one of them from a monitor watching a run the agent had itself cancelled via TaskStop before it ever acquired the lock.
  • Stale-wake identifiability — if a monitor fires anyway, its first line names what it watched and whether that thing is still alive, before the JSON. Today those six arrivals were indistinguishable: same shape, same full JSON, so the PM had to re-adjudicate each one to discover it was a repeat.
  • The ownership split either side of the report, which the issue's suggested direction guessed the other way round (see below).

2. The honesty clause, which is the point of the card. The section states plainly that following it does not mean the dev will be heard: 7 of 7 dispatches on 2026-08-08 failed to hand back cleanly after opening a correct PR, and three of those carried this clause verbatim in their dispatch prompt and failed anyway — 3 of 4 clause-carrying runs, which puts the cause outside anything a documentation change can reach. Two binding consequences follow in the text: never read your own silence as success, and the PM's probe-and-revive loop is the standing backstop, not an exception path. Every death so far was fully recoverable from transcript with zero work lost, so the cost is latency and not correctness — and the text says so, precisely so that a revived dev does not "recover" by redoing the work or opening a second PR.

3. Two existing sentences fixed in the same pass, because the addition would otherwise leave them misleading:

  • Resource rule 6 says a background watcher's wake-up "never arrives". Read against the publish/lint 面对字面量空组合子响亮拒收 —— #5322 拍板单位元后的可选编写期信号(PD #12 形状) #5330 evidence that is flatly contradictory, so rule 6 now points forward, and the new section reconciles the two explicitly: a monitor fires on its own deadline, not on the dev's need — it will not rescue a mid-task stop, and it will re-invoke a dev long after it finished. Same missing binding, seen from either side.
  • The Definition of done teardown bullet said "dev servers on random ports". Background monitors are also things the dev started, and they were the whole fifth sub-shape, so the bullet now names them.

Cross-reference, per the issue's third ask

The stale monitor is the same class of cost as the PM's own dispatch timers, where a deleted timer still delivers, and by delivery time its text may be several rounds behind reality — whose mitigation is that every such text opens with idempotent, re-read state before acting. The new section cites that convention by name and applies it to the dev in the other direction: before acting on any wake, re-read the real state rather than replaying the deliverable.

Deliberately NOT done, with pointers

Verification

No package code changed, so there is no unit test to add and no pnpm test or pnpm typecheck that is meaningful for this diff. Saying so beats manufacturing evidence that fits the template. What was run is the gate list enumerated from .github/workflows/lint.yml, after commit, all green:

  • check:skill-frame-sync — the one that reads this exact file: 4 copies of the decision frame are structurally isomorphic across 3 files, 3 axes, 40 markdown files scanned for undeclared copies.
  • check:doc-authoring365 files clean.
  • check:nul-bytesscanned 6258 tracked text file(s); no raw ASCII control bytes. Plus a manual scan of the edited file beyond the gate's surface, no matches.
  • check:role-word44 baselined file(s), no new occurrences.
  • check:docs-audit-scope, check:quick-reference-counts, check:adr-anchors, check:skill-compatibility — all OK.
  • pnpm lint — clean, exit 0.

Labels

skip-changeset: this PR touches only .claude/agents/os-dev.md, which is internal agent tooling and publishes nothing to any package, so it releases nothing and writes no changeset. Applied as a union with the labels already on the PR, not as a bare set.


Generated by Claude Code

@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Aug 8, 2026 1:51pm

Request Review

@os-project-manager
os-project-manager marked this pull request as ready for review August 8, 2026 13:52
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Aug 8, 2026
@os-project-manager os-project-manager added skip-changeset PR has no user-facing published change; bypasses the changeset gate and removed documentation Improvements or additions to documentation labels Aug 8, 2026 — with Claude
@os-project-manager
os-project-manager added this pull request to the merge queue Aug 8, 2026
Merged via the queue into main with commit 979ad95 Aug 8, 2026
26 checks passed
@os-project-manager
os-project-manager deleted the claude/issue-6586-dev-termination-contract branch August 8, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

1 participant