Repository navigation
Closed
Labels
effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/featureNew feature or capability requestNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilotFiled or worked by the queue/worker pilot
Description
Implements the determination recorded on #2225 (task 5226, 2026-11-02): codedb stops running one stdio process per MCP session (~1.1 GB RSS warm / ~2.1 GB cold-peak per instance on the largest project, measured) and becomes one shared daemon per project root plus a thin MCP bridge.
Spec (from the #2225 determination)
- Verify the daemon surface first:
codedb serveis an HTTP daemon on :7719 with routes mirroring the query surface (/tree,/outline,/search,/searchq,/word,/hot,/health) and no MCP route. Confirm exact request/response shapes against codedb's MCP tool surface, and daemon behaviour on a stale index. - Daemon unit: user systemd unit running
codedb servefor the~/git/coderoot first (add further primary roots only as needed; the daemon is per-root). - Bridge: a small stateless stdio MCP shim, fleet-owned in this repo, exposing codedb's MCP tools and forwarding to
http://127.0.0.1:7719for the session's project root. No index state in the shim. - Config PR: in
.mcpx.json, move codedb fromdisabledMcpServersback tomcpServerswithcommand= the bridge, retainingCODEDB_NO_TELEMETRY=1. This lifts the PR config: park qwen models (cline-pass/commandcode) + park codedb in mcpx — stacked on #2198 #2220 park in the new shape and closes Determine how to not need multiple codedb instances — or replace codedb effectively #2225.
Acceptance
- One
codedb servedaemon serves multiple concurrent MCP sessions through the bridge; no per-session codedb process holds an index (verify withps+ RSS during ≥3 concurrent sessions). - codedb MCP tools (search/find/outline/tree/word/hot) return the same results via the bridge as via direct stdio for a fixed query set on
~/git/code. .mcpx.jsonon main has codedb inmcpServers(bridge) and out ofdisabledMcpServers; Determine how to not need multiple codedb instances — or replace codedb effectively #2225 closed by the config PR.
Refs: #2225 determination comment, PR #2220 (the park).
Acceptance criteria
- The daemon surface is verified first:
codedb serveroutes and request/response shapes are confirmed against codedb's MCP tool surface, including behaviour on a stale index. - One shared
codedb servedaemon runs per project root (user systemd unit), replacing one stdio process per MCP session. - A thin MCP bridge connects sessions to the shared daemon; existing MCP tool behaviour is unchanged for callers.
- The config: park qwen models (cline-pass/commandcode) + park codedb in mcpx — stacked on #2198 #2220 park condition that this work lifts is recorded as resolved on the issue, with the measured per-instance RSS cost gone (one daemon per root instead of ~1.1 GB warm per session instance).
Metadata
Metadata
Assignees
Labels
effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/featureNew feature or capability requestNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilotFiled or worked by the queue/worker pilot
Activity
dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked
Fresh check (2026-11-02T02:24:57Z): issue #4120 is OPEN with no hard-stop labels, but the laptop — where every step of this task executes (codedb serve verification, user systemd unit, bridge testing against ~/git/code, RSS/concurrency measurements) — is at loadavg 78.76 / 103.39 / 94.70 with 14 rustc and 6 cargo processes running. Adding a daemon + index workload now would pile onto the saturation that drops Drew's connection, and the acceptance measurements (single index-holding process, RSS) would be meaningless under this contention. No daemon, unit, branch, or code changes were made.
dezren39 commentedon Nov 2, 2026
Intake review
queue/queued— it is in the queue's hands for routing.— Fleet monitor intake, 2026-11-01 20:12 CST run.
dezren39 commentedon Nov 2, 2026
agent-note:v1
event: parked
task: 6027
worker: repo-worker-code (lane A)
state: Revalidated fresh 2026-11-02T03:40Z: #4120 OPEN, no hard-stop labels, no existing PR or branch for this work. Scope is a fresh multi-part build (codedb serve systemd unit on the laptop + stdio MCP->HTTP bridge + .mcpx.json PR) at effort/m — exceeds the remainder of this shift, so parked for a fresh shift to claim with a full timebox rather than started and left half-built. Resume: start from the #2225 determination spec on this issue; code root first.
dezren39 commentedon Nov 2, 2026
🤖 Agent note · picked up
codedb servedaemon per project root (user systemd unit, ~/git/code first) + thin stdio MCP bridge in-repo + config PR lifting the PR config: park qwen models (cline-pass/commandcode) + park codedb in mcpx — stacked on #2198 #2220 park in .mcpx.json in the new shape.Merge pull request #4171 from developing-today/queue/6027-4120-codedb…
dezren39 commentedon Nov 2, 2026
🤖 Agent note · done — merged
codedb servedaemon per project root — user systemd unitcodedb-code.servicefor ~/git/code, active on the laptop,/healthok — fronted by the stateless stdio MCP bridgebin/codedb-bridge.mjs..mcpx.jsonon main has codedb inmcpServersvia the bridge (CODEDB_NO_TELEMETRY=1retained) and out ofdisabledMcpServers; issue Determine how to not need multiple codedb instances — or replace codedb effectively #2225 closed with this PR./health,/explore/{tree,outline,symbol,search,word,hot,deps}); bridge unit tests 8/8 (incl. both Codex P2 regression tests); bridge vs direct stdio equivalence on ~/git/code (search 45=45, word 45=45, symbol 2=2, outline 50/50 symbol names, hot 10/10); 3 concurrent bridge sessions returned full results with exactly one codedb process (the daemon). Codex review: both P2 findings fixed and dispositioned on PR feat(mcpx): codedb shared daemon + stdio MCP bridge — lift the #2220 park (#4120, #2225) #4171; final round clean.codedb servebinds fixed port 7719, so further per-root daemons need codedb port configurability first (recorded on PR feat(mcpx): codedb shared daemon + stdio MCP bridge — lift the #2220 park (#4120, #2225) #4171).