When running in serve mode, the log will contain two session IDs. #1129

Closed
opened 2026-02-16 17:29:33 -05:00 by yindo · 1 comment
Owner

Originally created by @zWingz on GitHub (Aug 6, 2025).

Originally assigned to: @thdxr on GitHub.

Image

When I create two sessions at the same time, the "session" tag in the log of the first session will be overwritten by the second session.
As shown in the picture, the first session ID is a_7c60d2e10c7c4e09a2d1302fc8294b4b, and the second session ID is a_2775284346704b2a8ef42a0f9f2d4623.

It is because log.clone() will get the same logger from cached

Image Image

The clone function should return a new logger

Originally created by @zWingz on GitHub (Aug 6, 2025). Originally assigned to: @thdxr on GitHub. <img width="1516" height="296" alt="Image" src="https://github.com/user-attachments/assets/37f02d63-2a53-4ce5-9cc9-80329a98a52e" /> When I create two sessions at the same time, the "session" tag in the log of the first session will be overwritten by the second session. As shown in the picture, the first session ID is `a_7c60d2e10c7c4e09a2d1302fc8294b4b`, and the second session ID is `a_2775284346704b2a8ef42a0f9f2d4623`. It is because `log.clone()` will get the same logger from `cached` <img width="743" height="141" alt="Image" src="https://github.com/user-attachments/assets/392fd823-1c6f-4b46-af87-26939b83bd4f" /> <img width="530" height="205" alt="Image" src="https://github.com/user-attachments/assets/19285685-3ab1-421a-b944-0523ae7f478a" /> The `clone` function should return a new logger
yindo closed this issue 2026-02-16 17:29:34 -05:00
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1129