Repository navigation
fix: open agent state on SQLite builds without extensions - #139487
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 7:13 PM ET / 23:13 UTC. ClawSweeper reviewWhat this changesDetect SQLite extension support before opening persistent or incognito agent databases, add regression coverage, and document Bun’s macOS limitations. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair: current main still requests unsupported extension loading when opening ordinary agent state. No blocking correctness or security findings were identified. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s agent database owner opens the SQLite connections used for sessions and other per-agent state. Runtime capability detection determines whether those connections can support native extensions while preserving ordinary database access. flowchart TD
A[Agent state request] --> B[Database owner]
C[Loaded SQLite library] --> D[Version and capability checks]
D --> E[Runtime permission guard]
E --> B
B --> F[Persistent or incognito database]
F --> G[Agent state reads and writes]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +15, Tests +42, Docs +8. Total +65 across 5 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep ordinary agent-state access independent of native extension availability while preserving the WAL floor, permission restrictions, and explicit extension requirements. Do we have a high-confidence way to reproduce the issue? Yes, source identifies the trigger: ordinary agent database creation requests extension support even when the loaded SQLite library omits it. This review did not execute a failing runtime reproduction. Is this the best way to solve the issue? Yes. Detecting the loaded library’s capability at runtime validation and applying it at the database owner is a narrow repair that preserves extension-capable setups and existing storage contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c91b1eaab768. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* origin/main: (95 commits) perf(build): avoid unrelated gateway artifact scans (#127757) fix(update): deliver terminal progress after long updates (#139289) fix(ui): show session hover cards for local chat URLs (#139384) perf(ui): reuse unchanged transcript key snapshots (#139400) fix(ui): make subagent sessions view-only (#139381) fix: open agent state on SQLite builds without extensions (#139487) perf(skills): detach cached metadata from source strings (#139478) fix(ui): show primary user in multi-agent profile hero (#136736) perf(sessions): stop decoding the session row four times per SQLite entry patch (#136361) refactor(exec): share package-manager option scans (#139482) fix(ci): authorize frozen mobile release candidates (#139441) fix: avoid session deletion slowdown in large session stores (#139467) perf(gateway): reuse node invocation idle timers (#139354) fix(auth): preserve selected profiles across plugin scopes (#139413) fix(discord): retain voice input until transcription completes (#139484) fix(agents): name Gateway storage failures in run-failure copy (#139409) fix: keep subagent checks responsive in large session stores (#139450) fix(memory): index notes when optional embeddings cannot start (#139463) fix: refresh pending approvals when reopening chat (#139457) fix(tooling): preserve Git hook choices during install (#139461) ...
What Problem This Solves
Fixes an issue where users running Bun on macOS could not open ordinary agent state because the system SQLite library does not support native extension loading.
Why This Change Was Made
Detect the loaded SQLite library's extension capability once during runtime validation. Persistent and incognito agent database owners request extension support only when the runtime supports it and permissions allow it. Explicitly extension-required operations remain strict, and extension loading remains disabled by default.
User Impact
Agent databases can open on SQLite builds without extensions. Native vector extensions still require an extension-capable library. No schema, persistence, migration, or permission policy changes.
Evidence