Dashboardopencode-lorePrompt-delta, provenance, and structure…

Prompt-delta, provenance, and structured recall replay invariants

Category: architecture
Confidence: 1.00
ID: 01a0a580-e8f7-7860-8e5a-b422ae1f5831
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 1aelD3bPMj85OkIM7
Created: 2026-06-26 16:35:19
Updated: 2026-09-15 14:38:04

Content

Prompt-delta insertion must not split assistant tool_use from the following user tool_result or occupy the true tail. safeDeltaInsertIndex() caps before the tail and walks backward across tool calls; keep the memory closer as a separate assistant message. Normalize provider tool_result strings or block arrays into GatewayContentBlock[], preserving multimodal output. Keep provenanceContent replay-only and never copy it into visible or temporal content. Recall follow-ups use structured assistant tool_use plus user tool_result, matching expandRecallMarkers(), rather than plain text that models may echo. Preserve Anthropic thinking/signatures and safe opaque Responses output, but exclude function calls, outputs, and item references from replay. When coalescing assistants, preserve leading thinking or redacted-thinking blocks at content[0].

Move to: