You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Session not automatically reset after lock failure #833
When the Telegram bridge fails with a session file lock error #831, the session is left in a broken state with accumulated "Tool not found" errors in the conversation history. On the next message, the agent resumes that corrupted context and behaves erratically (e.g., responding to "Hello" with "Let me open a new shell")
Reproduction Steps
Set up the Telegram bridge with nemoclaw start
Send a message that triggers the session lock error (code 255)
Send another message — the agent responds with unrelated tool invocations instead of a normal reply
Expected behavior:
After a lock failure, the bridge should either start a fresh session or discard the broken context before the next message.
Actual behavior:
The broken context persists and corrupts subsequent responses.
✨ Thanks for submitting this issue with a detailed summary, it addresses a bug with the session not being automatically reset after a lock failure, which could be related to the Telegram integration or session management.
Related to #831 — clearing lock files at startup prevents this state entirely
The broken session state described here is a downstream effect of the lock failure in #831. If the lock files are cleared before the bridge starts, the agent never enters this broken state.
See our workaround in #831 — running find /sandbox/.openclaw-data -name "*.lock" -delete via SSH before starting any bridge process prevents both the initial lock failure and this residual broken session state.
If you're already in the broken state (accumulated "Tool not found" errors), deleting the session files directly resolves it:
The agent will start a fresh session on the next message. Note: this clears conversation history, so back up sessions.json first if you want to preserve it.
Closing — this was the downstream consequence of #831, and both are eliminated by #1081.
The corrupted session state described here (accumulated "Tool not found" errors, erratic agent behavior on subsequent messages) was caused by the host-side Telegram bridge spawning overlapping SSH-based openclaw agent invocations that competed for the same session lock. When a call failed mid-operation (code 255), it left partial writes in the session .jsonl file, and the next message resumed that broken context.
With #1081, the host-side bridge is removed entirely. Messaging now runs as native OpenClaw channels inside the sandbox, where session access is serialized within the same process — there is no external mechanism to produce the lock contention that caused the corrupted session state in the first place.
Activity
wscurran commentedon Mar 25, 2026
✨ Thanks for submitting this issue with a detailed summary, it addresses a bug with the session not being automatically reset after a lock failure, which could be related to the Telegram integration or session management.
Possibly related open PRs:
#862 fix: auto-reset telegram bridge session after lock failure,
#860 fix: queue telegram bridge messages per chat to prevent session lock contention,
#750 fix(setup-spark): clarify that onboard must be re-run after setup (fixes #738)
dknos commentedon Mar 30, 2026
Related to #831 — clearing lock files at startup prevents this state entirely
The broken session state described here is a downstream effect of the lock failure in #831. If the lock files are cleared before the bridge starts, the agent never enters this broken state.
See our workaround in #831 — running
find /sandbox/.openclaw-data -name "*.lock" -deletevia SSH before starting any bridge process prevents both the initial lock failure and this residual broken session state.If you're already in the broken state (accumulated "Tool not found" errors), deleting the session files directly resolves it:
The agent will start a fresh session on the next message. Note: this clears conversation history, so back up
sessions.jsonfirst if you want to preserve it.prekshivyas commentedon Apr 2, 2026
Closing — this was the downstream consequence of #831, and both are eliminated by #1081.
The corrupted session state described here (accumulated "Tool not found" errors, erratic agent behavior on subsequent messages) was caused by the host-side Telegram bridge spawning overlapping SSH-based
openclaw agentinvocations that competed for the same session lock. When a call failed mid-operation (code 255), it left partial writes in the session.jsonlfile, and the next message resumed that broken context.With #1081, the host-side bridge is removed entirely. Messaging now runs as native OpenClaw channels inside the sandbox, where session access is serialized within the same process — there is no external mechanism to produce the lock contention that caused the corrupted session state in the first place.