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