Skip to content

Use crypto.randomUUID() for worktree branch names to prevent collisions #26

@that-github-user

Description

@that-github-user

Summary

src/utils/git.ts:22:

const branchName = \`thinktank/agent-\${id}-\${Date.now()}\`;

Uses Date.now() for uniqueness. If two thinktank processes start in the same millisecond, branch names could collide.

Proposed fix

const branchName = \`thinktank/agent-\${id}-\${crypto.randomUUID().slice(0, 8)}\`;

Low priority but easy fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions