fix(agent-runner): open inbound.db fresh per messages_in read#2160
Merged
Conversation
Cached singleton can return stale rows on virtiofs/NFS mounts, causing follow-up messages to silently never be polled. Add openInboundDb() with mmap_size=0 and switch the three messages_in readers to it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
|
@kky Thank you for the contribution!! |
mzazon
added a commit
to mzazon/nanoclaw
that referenced
this pull request
May 6, 2026
Brings in 202 upstream commits since our last sync. Key additions: - Circuit breaker for crash loop protection - Outbox path-confinement security fix (nanocoai#2001) - Inbound DB fresh-open fix for virtiofs/NFS (nanocoai#2160) - Orphan processing_ack cleanup (nanocoai#2151) - Pre-task scripts on follow-up poll injections (nanocoai#2114) - Attachment naming/safety refactor - Setup flow improvements (splash, headless, env reuse) - Channel approval flow enhancements Conflict resolution: - Dockerfile: kept OPENCODE_VERSION, adopted upstream's pinned Vercel 52.2.1 - poll-loop.ts: took upstream's async pre-task handling (subsumes our try/catch guard) - agent-route.ts: took upstream's factored-out isSafeAttachmentName - src/index.ts: kept both readEnvFile and new circuit-breaker imports - setup/verify.ts, agent-ping.ts: took upstream's simplified verify flow - package.json: took upstream version 2.0.25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
.claude/skills/<name>/, no source changes)Description
Cached singleton can return stale rows on virtiofs/NFS mounts, causing follow-up messages to silently never be polled. Add openInboundDb() with mmap_size=0 and switch the three messages_in readers to it. Cost is microseconds per query, so safe as a universal default.
Add
openInboundDb()that opens fresh per call withPRAGMA mmap_size = 0and switch the threemessages_inreaders to it withtry/finallyclose. The singleton stays for write-once tables (destinations,session_routing) and also getsmmap_size = 0for safety.Tested on Apple Silicon + Colima: prior to the fix, follow-up messages silently never reached the agent; after the fix, multi-turn chat works reliably.