()
| 198 | * 5. Session ID - fallback for standalone sessions |
| 199 | */ |
| 200 | export function getTaskListId(): string { |
| 201 | if (process.env.CLAUDE_CODE_TASK_LIST_ID) { |
| 202 | return process.env.CLAUDE_CODE_TASK_LIST_ID |
| 203 | } |
| 204 | // In-process teammates use the leader's team name so they share the same |
| 205 | // task list that tmux/iTerm2 teammates also resolve to. |
| 206 | const teammateCtx = getTeammateContext() |
| 207 | if (teammateCtx) { |
| 208 | return teammateCtx.teamName |
| 209 | } |
| 210 | return getTeamName() || leaderTeamName || getSessionId() |
| 211 | } |
| 212 | |
| 213 | /** |
| 214 | * Sanitizes a string for safe use in file paths. |
no test coverage detected