Skip to content

Commit adb5441

Browse files
committed
Use session thread ID during OpenClaw teardown
- Report teardown errors against `context.session.threadId` - Keep websocket and session.stop cleanup aligned with the active session
1 parent 719c5d3 commit adb5441

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/server/src/provider/Layers/OpenClawAdapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ function makeOpenClawAdapter(options?: OpenClawAdapterLiveOptions) {
799799
catch: (cause) =>
800800
new ProviderAdapterProcessError({
801801
provider: PROVIDER,
802-
threadId: context.threadId,
802+
threadId: context.session.threadId,
803803
detail: "Failed to send session.stop during teardown.",
804804
cause,
805805
}),
@@ -812,7 +812,7 @@ function makeOpenClawAdapter(options?: OpenClawAdapterLiveOptions) {
812812
catch: (cause) =>
813813
new ProviderAdapterProcessError({
814814
provider: PROVIDER,
815-
threadId: context.threadId,
815+
threadId: context.session.threadId,
816816
detail: "Failed to close websocket during teardown.",
817817
cause,
818818
}),

0 commit comments

Comments
 (0)