Zion Boggan zionboggan.com ↗

Recover real prompts wrapped in harness reminder blocks

The parser dropped any user turn whose text began with <system-reminder>
or <task-notification>, discarding the human prompt the harness had
wrapped alongside the reminder. On the real session this silently lost 12
substantive turns, including constraints and decisions (keep zero-dep,
do not overload the platform). Strip the wrapper block(s) and keep the
user's real text; pure-meta turns and non-recoverable caveats still drop.
444a6ba   Zion Boggan committed on Jun 13, 2026 (1 week ago)
src/parse.js +14 -1
@@ -151,7 +151,11 @@ function ingestUser(session, rec) {
}
const classification = classifySpecialUserText(trimmed);
- if (classification === 'meta') return;
+ if (classification === 'meta') {
+ const recovered = stripWrapperMeta(trimmed);
+ if (!recovered || recovered === trimmed) return;
+ trimmed = recovered;
+ }
if (classification === 'compact-continuation') {
session.isContinuation = true;
return;
@@ -290,6 +294,15 @@ function flattenUserContent(content) {
const COMPACT_CONTINUATION_RE =
/^this session is being continued from a previous conversation/i;
+function stripWrapperMeta(text) {
+ return String(text || '')
+ .replace(/<system-reminder>[\s\S]*?<\/system-reminder>/gi, '')
+ .replace(/<task-notification>[\s\S]*?<\/task-notification>/gi, '')
+ .replace(/<system-reminder>[\s\S]*$/i, '')
+ .replace(/<task-notification>[\s\S]*$/i, '')
+ .trim();
+}
+
export function classifySpecialUserText(text) {
if (COMPACT_CONTINUATION_RE.test(text)) return 'compact-continuation';
if (