Repository navigation
Conversation
…d headers (openclaw#78091) OpenAI-compatible frontends like Open-WebUI that do not set the `user` field caused a new random-UUID session to be created on every request, leading to session proliferation (44+ sessions per conversation) and lost conversation continuity. `resolveSessionKey` now checks the `X-Chat-Id` header (sent by Open-WebUI) and the `X-Thread-Id` header (Langchain, etc.) before falling back to a random UUID. `X-OpenClaw-Session-Key` still takes highest precedence, and the existing `user`-field path is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Keep open: this PR targets a real source-level OpenAI-compatible session-continuity problem and is the direct candidate for the linked Open-WebUI issue, but it is not merge-ready because the patch changes established session precedence, misses Open-WebUI's default forwarded chat-id header, broadens shared Responses behavior, and still lacks real after-fix proof. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. Do we have a high-confidence way to reproduce the issue? Yes at source level: Is this the best way to solve the issue? No, not as-is: header-based correlation is plausible, but this patch changes precedence, misses Open-WebUI's default forwarded header, and broadens the shared resolver without enough endpoint coverage. The safer path is a maintainer-confirmed session contract with explicit precedence and live proof. Security review: Security review cleared: No dependency, workflow, secret, permission, lockfile, generated-code, or supply-chain surface is changed by this source/test-only diff. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 010b61746379. |
|
Heads up: this PR needs to be updated against current |
|
This pull request has been automatically marked as stale due to inactivity. |
|
@Beandon13 thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward. Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive. Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it. |
|
Closing per ClawSweeper review verdict |
Summary
/v1/chat/completionsendpoint generated a random-UUID session key when theuserfield was absent, causing Open-WebUI (and similar frontends) to create a new isolated session per message instead of reusing one session per conversation.X-Chat-Id(Open-WebUI) andX-Thread-Id(Langchain / other clients) headers first; when either is present a deterministic session key<prefix>-chat:<id>is derived, so all turns in one conversation land in the same session.X-OpenClaw-Session-Keyand theuser-field path are fully preserved and still take higher precedence.Closes #78091
Testing
Real behavior proof
X-Chat-Id: <uuid>per the Open-WebUI OpenAI backend docs when configured to use a custom OpenAI-compatible backend; without this fix every message createsagent:<id>:openai:<random-uuid>, reproducing 44+ dead sessions per conversation as shown in the issue.proof:override or advise on evidence format.