Skip to content

fix(local): reuse database for toolkit MCP sessions - #1619

Open
jamieb72-afk wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
jamieb72-afk:codex/mcp-db-lock
Open

fix(local): reuse database for toolkit MCP sessions#1619
jamieb72-afk wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
jamieb72-afk:codex/mcp-db-lock

Conversation

@jamieb72-afk

@jamieb72-afk jamieb72-afk commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #1618.

Summary

  • construct toolkit-scoped executors over the daemon's already-owned FumaDB handle
  • cache one scoped executor per MCP resource for the daemon lifetime, preventing connector processes from multiplying as clients open tasks
  • preserve toolkit-specific filtering, analytics, artifacts, connections, and web base URL behavior
  • add HTTP regression coverage for SQLite ownership and multi-client resource reuse/disposal
  • add a patch Changeset for the published CLI

Verification

  • bunx --bun vitest run in apps/local: 76 passed
  • bun run typecheck in apps/local: passed
  • bun run format:check: passed
  • bun run lint: passed
  • bun run typecheck: 44 packages passed
  • local arm64 build smoke: executor v1.5.41
  • live local daemon: default MCP and both toolkit endpoints returned 200; reopening the same toolkit left the direct-child PID set unchanged at zero

The repository-wide test command reached an existing local runtime mismatch outside this change: better-sqlite3 was compiled for Node ABI 141 while the installed Node 26 runtime requires ABI 147. The complete local app suite and both regressions pass under Bun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toolkit MCP routes fail with SQLite owner lock in local daemon

1 participant