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]: Delegated threads from one parent session share a single provider event log #29744
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
From one parent thread, have the agent start several delegated tasks with delegate_task.
Let each child run a turn, ideally with different providers (for example, one Claude child and one Codex child).
Open <T3 home>/userdata/logs/provider/ and look for the events.<thread segment>.log files of those children.
The filename comes from resolveThreadSegment in apps/server/src/provider/EventNdjsonLogger.ts, which calls toSafeThreadAttachmentSegment in apps/server/src/attachmentStore.ts. That function cuts the sanitized thread ID to ATTACHMENT_ID_THREAD_SEGMENT_MAX_CHARS (80) characters. Delegated thread IDs start with a long shared prefix, thread:delegated-task:command%3Amcp%3A<parent provider session id>%3Adelegate-task%3A..., so the cut lands before the part that differs between children:
Both map to thread-delegated-task-command-3amcp-3a00000000-0000-4000-8000-000000000000-3adel, so both write to the same file.
Expected behavior
Each thread writes to its own provider event log file. Threads whose IDs fit in the current segment keep their current filenames.
Actual behavior
Delegated threads started by the same parent session share one log file, and their events are interleaved in it. One install had 28 delegated threads spread over only 7 log files. One file held 15 threads. Another held 7 threads and mixed 1,052 Claude lines with 1,444 Codex lines. You cannot tell which child wrote a given line without parsing every record, so the logs are not usable for debugging delegated work.
Activity