You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
packages/squad-sdk/src/agents/history-shadow.ts builds section-boundary regular expressions with \Z at two call sites. JavaScript RegExp does not support \Z as an end-of-string anchor, so it is interpreted as a literal Z.
Impact
Appending to the terminal References section does not find the existing section and adds a second ## References header.
Appending to non-terminal sections finds the next header but collapses the blank-line separator before it.
The read/parse path contains the same invalid anchor and needs equivalent correction.
Evidence
packages/squad-sdk/src/agents/history-shadow.ts, write path near line 236
packages/squad-sdk/src/agents/history-shadow.ts, read/parse path near line 331
packages/squad-sdk/src/state/io/history-io.ts already documents and avoids this anchor through header-position splitting
Replace the invalid anchor with a JavaScript-correct end-of-string strategy, or reuse the header-position splitting approach already implemented in history-io.ts so both paths share one correct boundary implementation.
Acceptance criteria
Appending to terminal References inserts the entry under the existing header without duplicating it.
Appending to non-terminal sections preserves the blank line between sections.
The read/parse path handles terminal sections correctly.
Surgeon will pick this up in the next Copilot session.
For Copilot coding agent: If enabled, this issue will be worked automatically.
Otherwise, start a Copilot session and say: Surgeon, work on issue #1500
sdk-runtime-dev will pick this up in the next Copilot session.
For Copilot coding agent: If enabled, this issue will be worked automatically.
Otherwise, start a Copilot session and say: sdk-runtime-dev, work on issue #1500
Activity
github-actions commentedon Jul 18, 2026
📋 Assigned to Surgeon (Release Manager)
Issue: #1500 — history-shadow.ts uses invalid \Z regex anchor, duplicating headers and collapsing separators
Surgeon will pick this up in the next Copilot session.
github-actions commentedon Sep 10, 2026
🔄 Ralph — Auto-Triage
Assigned to: Procedures
Reason: Matched module path "src/agents/" to primary owner "Procedures 🧠"
Source: module-ownership
github-actions commentedon Sep 10, 2026
🔄 Ralph — Auto-Triage
Assigned to: Procedures
Reason: Matched module path "src/agents/" to primary owner "Procedures 🧠"
Source: module-ownership
github-actions commentedon Sep 11, 2026
🔄 Ralph — Auto-Triage
Assigned to: Procedures
Reason: Matched module path "src/agents/" to primary owner "Procedures 🧠"
Source: module-ownership
github-actions commentedon Sep 11, 2026
🔄 Ralph — Auto-Triage
Assigned to: Procedures
Reason: Matched module path "src/agents/" to primary owner "Procedures 🧠"
Source: module-ownership
github-actions commentedon Sep 11, 2026
🔄 Ralph — Auto-Triage
Assigned to: Procedures
Reason: Matched module path "src/agents/" to primary owner "Procedures 🧠"
Source: module-ownership
github-actions commentedon Sep 11, 2026
🔄 Ralph — Auto-Triage
Assigned to: Procedures
Reason: Matched module path "src/agents/" to primary owner "Procedures 🧠"
Source: module-ownership
github-actions commentedon Sep 11, 2026
🔄 Ralph — Auto-Triage
Assigned to: Procedures
Reason: Matched module path "src/agents/" to primary owner "Procedures 🧠"
Source: module-ownership
github-actions commentedon Sep 13, 2026
🔄 Ralph — Auto-Triage
Assigned to: architect
Reason: No module, routing, or role keyword match — routed to Lead/Architect
Source: lead-fallback
github-actions commentedon Sep 24, 2026
📋 Assigned to sdk-runtime-dev (SDK Runtime Engineer)
Issue: #1500 — history-shadow.ts uses invalid \Z regex anchor, duplicating headers and collapsing separators
sdk-runtime-dev will pick this up in the next Copilot session.
fix(sdk): replace invalid \Z regex anchor in history-shadow (#2374)