openclaw - 💡(How to fix) Fix Gateway leaks transient sessions when target session transcript is missing during polling [1 pull requests]

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…

Error Message

The gateway should return a 404 error, log a warning, or self-heal/recreate the missing transcript placeholder instead of silently spawning and persisting a new transient session on every poll.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Describe the bug

When an API client or integration (specifically the Home Assistant custom integration) polls the /tools/invoke endpoint (requesting sessions_list) on a 30-second interval, the gateway attempts to resolve/load the target session.

If the target session's transcript file (.jsonl format) is missing or deleted from the filesystem, the gateway's fallback logic silently spawns a new transient session ID. This leads to rapid file and directory bloat, filling the session store (e.g., sessions.json and associated files) with infinite transient sessions.

Steps to Reproduce

  1. Set up an API client/integration (like Home Assistant) to poll the /tools/invoke endpoint periodically for a specific session ID.
  2. Manually delete the corresponding .jsonl transcript file from the agent's session directory (e.g., agents/main/sessions/).
  3. Check the session directory after a few minutes.
  4. Notice that sessions.json has accumulated a new transient session entry for every poll event.

Expected behavior

The gateway should return a 404 error, log a warning, or self-heal/recreate the missing transcript placeholder instead of silently spawning and persisting a new transient session on every poll.

Environment

  • OpenClaw version: 2026.5.22 (macOS global install)
  • Gateway supervisor: launchd

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…

FAQ

Expected behavior

The gateway should return a 404 error, log a warning, or self-heal/recreate the missing transcript placeholder instead of silently spawning and persisting a new transient session on every poll.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING