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
{{ message }}
Repository navigation
D1_ERROR: out of memory (SQLITE_NOMEM) on notebooks list/create — blocks session-archive ingest #11
The agent-memory.mjs archive-raw-session Claude Code Stop-hook client (from the aegis-daemon project) fails when calling MindSpring's notebooks endpoint, with a D1 out-of-memory error returned as HTTP 501:
HTTP 501 from https://mindspring.blue-pine-edf6.workers.dev/api/v2/workspaces/aegis-daemon/notebooks:
{"error":"Error: D1_ERROR: out of memory: SQLITE_NOMEM"}
Observed in .agent-memory/logs/2026-07-03.jsonl in a client repo, timestamp 2026-07-03T11:00:59.281Z.
Impact
The Stop hook (mindspring-session-push.sh → agent-memory.mjs archive-raw-session) that archives session transcripts into the session_history notebook fails on this call.
Because the failure is a D1 out-of-memory condition rather than a fast validation error, the request appears to take a long time to fail (consistent with a query scanning/spilling before erroring out) — this made every Claude Code session's Stop hook take several minutes to complete on the client side before giving up.
On failure the client enqueues a local retry file (.agent-memory/retry/*.json) but does not otherwise recover.
Suspected cause
GET/POST /api/v2/workspaces/{workspace}/notebooks (list-or-create-by-title flow) is likely running an unbounded or inefficient D1 query — possibly scanning a large/unindexed table (e.g. all notebooks across workspaces, or a large session_history table growing unbounded from repeated archive pushes) that exhausts available memory in the Workers/D1 execution context.
Suggested next steps
Reproduce against the aegis-daemon workspace (workspace=aegis-daemon, notebookTitle=session_history).
Check the query behind the notebooks list endpoint for missing indexes / unbounded scans.
Consider paginating or scoping the notebooks list query, and/or capping session_history growth (archive/prune old entries).
Return a fast, clear error instead of letting the query run to an OOM condition, so callers don't hang.
Workaround applied client-side
Disabled the global Stop hook in ~/.claude/settings.json for now, since it was blocking session shutdown for minutes on every session. Will need to be re-enabled once this is fixed.
⚠️ This content may include sensitive data (phone).
Please redact PII/secrets and replace with placeholders (for example, <CLIENT_A>, <TOKEN_REDACTED>).
If this is a real vulnerability or secret exposure, use a private security advisory: https://github.com/Stackbilt-dev/mindspring/security/advisories/new
Activity
github-actions commentedon Jul 3, 2026
Please redact PII/secrets and replace with placeholders (for example,
<CLIENT_A>,<TOKEN_REDACTED>).If this is a real vulnerability or secret exposure, use a private security advisory: https://github.com/Stackbilt-dev/mindspring/security/advisories/new