openclaw - 💡(How to fix) Fix iMessage subsystem auto-restarts in 5s loop on large `chat.db` (chats.list timeout) [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#75792Fetched 2026-05-02 05:30:03
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
2
Timeline (top)
commented ×2closed ×1referenced ×1

Error Message

[imessage] [default] starting provider (/opt/homebrew/bin/imsg db=/Users/.../chat.db) [imessage] imsg rpc not ready after 14806ms (Error: imsg rpc timeout (chats.list)) [imessage] [default] auto-restart attempt 1/10 in 5s [imessage] [default] starting provider (/opt/homebrew/bin/imsg db=...) [imessage] imsg rpc not ready after 14806ms (Error: imsg rpc timeout (chats.list)) ... (10 attempts, then exits)

Fix Action

Fix / Workaround

Workaround: set channels.imessage.enabled: false (loses iMessage entirely).

Code Example

[imessage] [default] starting provider (/opt/homebrew/bin/imsg db=/Users/.../chat.db)
[imessage] imsg rpc not ready after 14806ms (Error: imsg rpc timeout (chats.list))
[imessage] [default] auto-restart attempt 1/10 in 5s
[imessage] [default] starting provider (/opt/homebrew/bin/imsg db=...)
[imessage] imsg rpc not ready after 14806ms (Error: imsg rpc timeout (chats.list))
... (10 attempts, then exits)
RAW_BUFFERClick to expand / collapse

On a Mac with a 94 MB chat.db (~years of iMessage history), the openclaw iMessage subsystem cannot complete chats.list RPC within the 14.8s window before timeout. Pattern in gateway.err.log:

[imessage] [default] starting provider (/opt/homebrew/bin/imsg db=/Users/.../chat.db)
[imessage] imsg rpc not ready after 14806ms (Error: imsg rpc timeout (chats.list))
[imessage] [default] auto-restart attempt 1/10 in 5s
[imessage] [default] starting provider (/opt/homebrew/bin/imsg db=...)
[imessage] imsg rpc not ready after 14806ms (Error: imsg rpc timeout (chats.list))
... (10 attempts, then exits)

While this loop is happening, the 30-second imsg subprocess wait blocks the openclaw event loop, causing eventLoopDelayMaxMs to spike to 30000+ms, which in turn:

  • Times out the gateway HTTP server (HTTP 000 to clients)
  • Times out other channel providers (Telegram, Discord)
  • Trips circuit breakers on model providers

Workaround: set channels.imessage.enabled: false (loses iMessage entirely).

Proposed fix:

  • (Short term) Make chats.list timeout configurable: channels.imessage.chatsListTimeoutMs (default 14800, overridable up to e.g. 60000)
  • (Medium term) Make the initial chats.list non-blocking: spawn imsg, mark provider as "starting", run chats.list async, only fail provider after async timeout — this keeps the event loop free
  • (Long term) Move the imsg subprocess off the event-loop thread entirely (worker thread or separate process supervised via IPC)

Verified imsg binary itself is healthy: /opt/homebrew/bin/imsg chats --limit 2 returns ~50ms. The issue is specifically imsg rpc JSON-RPC chats.list on the large db.

Repro: install imsg, point at a chat.db with several thousand chats (typical for a long-time Mac user), enable iMessage channel, observe the auto-restart loop.

extent analysis

TL;DR

Increase the chatsListTimeoutMs value to a higher number, such as 60000, to allow the chats.list RPC to complete without timing out.

Guidance

  • Identify the current value of chatsListTimeoutMs and consider increasing it to a higher value, such as 60000, to accommodate the large chat.db file.
  • Verify that the imsg binary is healthy by running the command /opt/homebrew/bin/imsg chats --limit 2 and checking the response time.
  • Consider implementing the proposed medium-term fix of making the initial chats.list non-blocking to prevent the event loop from being blocked.
  • Test the workaround by setting channels.imessage.enabled: false to confirm that it resolves the issue, but note that this will disable iMessage functionality.

Example

No code snippet is provided as it is not necessary for this issue.

Notes

The issue is specific to the imsg rpc JSON-RPC chats.list on a large chat.db file, and the proposed fixes are targeted at addressing this specific problem. The imsg binary itself has been verified to be healthy.

Recommendation

Apply the workaround by increasing the chatsListTimeoutMs value, as this is a simple and effective way to resolve the issue without disabling iMessage functionality entirely.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix iMessage subsystem auto-restarts in 5s loop on large `chat.db` (chats.list timeout) [2 comments, 2 participants]