Problem
Pi native memory wrappers currently accept model-supplied session IDs, synthesize manual IDs, and cache a runtime session before Engram acknowledges registration. A failed registration can therefore suppress retries or let session-attributed writes proceed with untrusted identity.
Expected behavior
- Use only
ctx.sessionManager.getSessionId() for the four session-attributed writes.
- Remove model-facing
session_id fields from those native tool schemas.
- Require successful Engram session registration before writing.
- Cache only acknowledged registration and leave failures retryable.
- Missing runtime identity fails safely without synthesizing a manual ID.
- Scope per-case declarations so Pi passes directed Biome lint.
Acceptance criteria
- Runtime test covers failed acknowledgement, retry, successful cache, model-ID rejection, and missing runtime ID.
- Pi complete test suite passes.
- Directed Biome lint reports no errors.
- No changes to OpenCode, Go core, persisted schema, handles, flags, or fallback policy.
Related
Problem
Pi native memory wrappers currently accept model-supplied session IDs, synthesize manual IDs, and cache a runtime session before Engram acknowledges registration. A failed registration can therefore suppress retries or let session-attributed writes proceed with untrusted identity.
Expected behavior
ctx.sessionManager.getSessionId()for the four session-attributed writes.session_idfields from those native tool schemas.Acceptance criteria
Related