Repository navigation
fix(build): pin Node 24.18.0 to stop the agent crash loop - #214
Merged
Merged
Conversation
Since the 2026-09-07 release the agent aborts whenever a scheduled job starts, so the morning briefing and every other daily job stopped. Cause: the Dockerfiles used the floating node:24-alpine tag. The rebuild pulled Node 24.20, and Node 24.19 added cleanup hooks to node::ObjectWrap (nodejs/node#65446). better-sqlite3 builds on ObjectWrap, so when garbage collection frees one of its objects Node fails "RemoveEnvironmentCleanupHook ... (env) != nullptr" and aborts. - Pin node:24.18.0-alpine (the last good build) in all five Dockerfiles, with a note on when to move it. Match CI and .nvmrc. - searchMessages: the LIKE pattern was "% q % ", which only matched text ending in a space, so searchMemory/searchHistory never found chat history. Use "%q%" and escape LIKE wildcards. - sendMessage: keep an explicit "@lid" target. It rebuilt every target as "<digits>@s.whatsapp.net", which reaches nobody for LID-only contacts.
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.
Summary
Since the 2026-09-07 release, the agent crashes whenever a scheduled job starts. The morning briefing, the backups and the other daily jobs have not run since.
Cause
The Dockerfiles used the moving
node:24-alpinetag. The Sept 7 rebuild pulled Node 24.20. Node 24.19 added cleanup hooks tonode::ObjectWrap(nodejs/node#65446, still open).better-sqlite3builds its classes onObjectWrap. When garbage collection frees one of those objects, Node failsRemoveEnvironmentCleanupHook ... Assertion failed: (env) != nullptrand aborts. Job start is a busy moment, so that is when it happens.Changes
node:24.18.0-alpine, the version in the last good build, in all five Dockerfiles. Each carries a note on when it is safe to move. CI and.nvmrcnow use 24.18.0 too (they were on 20 and 18).searchMessages: the pattern was% q %, which only matched text ending in a space.searchMemoryandsearchHistorynever returned chat history. It now uses%q%and escapes LIKE wildcards.sendMessage: keep an explicit@lidtarget. It rebuilt every target as<digits>@s.whatsapp.net, which reaches nobody when a contact is only known by LID.I tried
npm ciin the builders, but it rejects turbo's pruned lockfile for the agent, so they stay onnpm install.Tests
AgentDB.searchMessagestests run against a real SQLite database. The old tests mocked this method, so the bug never surfaced.sendMessagetests cover a@lidtarget and a bare phone number.