Repository navigation
fix(coordinator): a user's team decision reaches decisions.md in the same turn - #2505
Conversation
…same turn Live mixed-host run (Claude Code + Copilot CLI on one squad): a decision recorded in Claude stayed in the inbox and Copilot, which reads only decisions.md, didn't see it. Non-Copilot digests now spawn Scribe right after squad_decide for user-stated decisions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🟡 Impact Analysis — PR #2505Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (2 files)
squad-sdk (1 file)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 3 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | CHANGELOG.md edit found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ❌ | CI passing | 1 check(s) still running |
Files Changed (4 files, +14 −2)
| File | +/− |
|---|---|
CHANGELOG.md |
+1 −0 |
packages/squad-sdk/src/client/adapters/coordinator.ts |
+1 −1 |
plugins/squad/agents/squad.md |
+1 −1 |
test/claude-permissions-safety.test.ts |
+11 −0 |
Total: +14 −2
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human validation is needed for immediate Scribe merges across six hosts interacting with end-of-batch merges and concurrent Copilot writes, since the regression test checks instruction text rather than runtime behavior.
No open issues 🎉
What changed in this PR
Updates non-Copilot coordinator instructions to spawn Scribe immediately after recording a user-stated team decision, making it available to hosts that read only the merged decisions.md. Copilot’s behavior is unchanged.
Changes:
- Require same-turn background Scribe dispatch after
squad_decidefor user-stated decisions. - Synchronize the generated plugin and add instruction coverage for all six non-Copilot hosts.
- Document the fix and add an SDK patch changeset.
| File | Description |
|---|---|
test/claude-permissions-safety.test.ts |
Checks the immediate Scribe-dispatch rule across six hosts. |
plugins/squad/agents/squad.md |
Updates the generated plugin’s decision-handling instructions. |
packages/squad-sdk/src/client/adapters/coordinator.ts |
Adds immediate Scribe dispatch to non-Copilot coordinator instructions. |
CHANGELOG.md |
Documents the mixed-host decision-sharing fix. |
.changeset/decisions-reach-every-host.md |
Records the SDK patch release change. |
Review effort: Balanced (dynamic)
|
|
||
| 10. **Response Mode Selection.** Pick the lightest mode that is correct, biasing upward when unsure: **Direct** (you answer from known facts, no spawn: status, roster, "who owns X", trivial questions); **Lightweight** (one specialist, minimal context: typo, small read-only lookup); **Standard** (one or more specialists with full charter/decision context: normal feature/bug work, plus the reviewer gate in item 12 for any code or test change); **Full** (multi-agent fan-out plus reviewer gate and Scribe: cross-cutting or risky work). Acknowledge immediately before spawning: one line naming who you are launching and why, then spawn. | ||
| 11. **Scribe spawn protocol and drop-box pattern.** Agents never write \`${S}/decisions.md\` directly: decisions go to \`${S}/decisions/inbox/\` (via \`squad_decide\`). After a substantive batch of work (or when the inbox is non-empty at session end), spawn **Scribe** (background/last) with its charter to: run \`squad_state_health\`; list the inbox; merge each entry into \`decisions.md\` (demote headings beneath a dated \`###\` entry, de-duplicate), re-read to verify, then delete only processed inbox entries; archive old decisions only through the state tools/\`squad nap\`, never by hand-deleting history. Scribe never commits mutable state, and neither Scribe nor you writes session logs or orchestration logs (retired; Scribe's charter rules them out). If a required state tool is unavailable, report it; do not fall back to unsafe direct writes. | ||
| 11. **Scribe spawn protocol and drop-box pattern.** Agents never write \`${S}/decisions.md\` directly: decisions go to \`${S}/decisions/inbox/\` (via \`squad_decide\`). **A decision the user states for the team** ("record a team decision", "from now on…") is not left in the inbox: right after \`squad_decide\`, spawn Scribe (background) in the same turn to merge it, because \`decisions.md\` is what teammates on other hosts (Copilot reads only the merged file) and fresh sessions read. After a substantive batch of work (or when the inbox is non-empty at session end), spawn **Scribe** (background/last) with its charter to: run \`squad_state_health\`; list the inbox; merge each entry into \`decisions.md\` (demote headings beneath a dated \`###\` entry, de-duplicate), re-read to verify, then delete only processed inbox entries; archive old decisions only through the state tools/\`squad nap\`, never by hand-deleting history. Scribe never commits mutable state, and neither Scribe nor you writes session logs or orchestration logs (retired; Scribe's charter rules them out). If a required state tool is unavailable, report it; do not fall back to unsafe direct writes. |
Found in a live check of one squad, two people, two hosts: Alex on Claude Code 2.1.318, Blake on Copilot CLI 1.0.111, in the same repository on the local backend.
{error, code}"decisions/inbox/, and Scribe isn't spawnedsquad_decide, then Scribe merges it in the same turndecisions.md(memory.write)Cause: Copilot's coordinator records a user's decision with
memory.write, which writesdecisions.mddirectly, and reads only the merged file. The non-Copilot digests usedsquad_decide, which writes to the inbox, and spawned Scribe only "after a substantive batch". The fix applies to the non-Copilot digests only (item 11): for a decision the user states, Claude now spawns Scribe in the background right aftersquad_decide. Copilot's output is unchanged.Across clones, sharing works the same as for Copilot: the inbox is gitignored on
local, anddecisions.mdis committed. Teams that want state to sync without commits useorphanortwo-layer.Test:
test/claude-permissions-safety.test.tschecks the rule on the 6 non-Copilot hosts. The plugin is regenerated (still pinned to preview.4).🤖 Generated with Claude Code