Skip to content

fix(coordinator): a user's team decision reaches decisions.md in the same turn - #2505

Merged
bradygaster merged 3 commits into
devfrom
squad/decisions-reach-every-host
Nov 14, 2026
Merged

bradygaster merged 3 commits into
devfrom
squad/decisions-reach-every-host

Conversation

@bradygaster

Copy link
Copy Markdown
Collaborator

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.

Step Before After
Alex (Claude) records "API errors are JSON {error, code}" stays in decisions/inbox/, and Scribe isn't spawned squad_decide, then Scribe merges it in the same turn
Blake (Copilot) asks which decisions apply "No error-response convention is recorded yet" lists both of Alex's decisions and Blake's own, with authors
Blake (Copilot) records "timestamps are ISO 8601 UTC" written to decisions.md (memory.write) same
Alex (Claude) asks sees Blake's decision ✅ same

Cause: Copilot's coordinator records a user's decision with memory.write, which writes decisions.md directly, and reads only the merged file. The non-Copilot digests used squad_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 after squad_decide. Copilot's output is unchanged.

Across clones, sharing works the same as for Copilot: the inbox is gitignored on local, and decisions.md is committed. Teams that want state to sync without commits use orphan or two-layer.

Test: test/claude-permissions-safety.test.ts checks the rule on the 6 non-Copilot hosts. The plugin is regenerated (still pinned to preview.4).

🤖 Generated with Claude Code

…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>
Copilot AI dynamic review requested due to automatic review settings November 14, 2026 17:49
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Impact Analysis — PR #2505

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 4
Files added 0
Files modified 4
Files deleted 0
Modules touched 3

🎯 Risk Factors

  • 4 files changed (≤5 → LOW)
  • 3 modules touched (2-4 → MEDIUM)

📦 Modules Affected

root (2 files)
  • CHANGELOG.md
  • plugins/squad/agents/squad.md
squad-sdk (1 file)
  • packages/squad-sdk/src/client/adapters/coordinator.ts
tests (1 file)
  • test/claude-permissions-safety.test.ts

This report is generated automatically for every PR. See #733 for details.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit d645a41

PR Scope: 📦🔧 Mixed (product + infrastructure)

⚠️ 3 item(s) to address before review

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>

Copilot AI 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.

🔵 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_decide for 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.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bradygaster
bradygaster merged commit e68499f into dev Nov 14, 2026
31 checks passed
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.

3 participants