-
-
Notifications
You must be signed in to change notification settings - Fork 57.2k
Open
Labels
bugSomething isn't workingSomething isn't workingdedupe:parentPrimary canonical item in dedupe clusterPrimary canonical item in dedupe clusterstaleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Description
Channel handlers (especially Telegram) frequently fail with lock timeout when the agent is processing any long operation (exec commands, HTTP requests, tool calls, etc):
error gateway/channels/telegram handler failed: Error: timeout acquiring session store lock: /root/.clawdbot/agents/main/sessions/sessions.json.lock
This happens even with a single channel active - it's not specific to multi-channel scenarios.
Steps to Reproduce
- Start a conversation that triggers a long operation (e.g., slow exec command, HTTP request that hangs)
- While processing, send another message from the same or different channel
- The new message fails with lock timeout
Expected Behavior
Messages should queue and process sequentially, or the lock acquisition should have a longer timeout with retries.
Actual Behavior
The channel handler fails immediately when it can't acquire the lock within the timeout period. The user sees no response and has to retry.
Environment
- Clawdbot version: 2026.1.24-3
- OS: Linux (Ubuntu)
- Channels: Telegram, WhatsApp
- Agent config: maxConcurrent: 4
Current Workaround
Cron job to clean stale locks every 2 minutes:
*/2 * * * * find /root/.clawdbot/agents/main/sessions -name "*.lock" -mmin +2 -deleteThis helps recover from stuck locks but doesn't prevent the failures.
Suggestions
- Increase lock acquisition timeout for channel handlers
- Implement automatic retry with backoff
- Use a message queue instead of failing immediately
- Consider async/non-blocking lock mechanism
- Separate lock scopes for different operations (read vs write)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdedupe:parentPrimary canonical item in dedupe clusterPrimary canonical item in dedupe clusterstaleMarked as stale due to inactivityMarked as stale due to inactivity