Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/claude_agent_sdk/_internal/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
MAX_SANITIZED_LENGTH = 200

_UUID_RE = re.compile(
r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
re.IGNORECASE,
)

Expand All @@ -68,7 +68,7 @@

def _validate_uuid(maybe_uuid: str) -> str | None:
"""Returns the string if it is a valid UUID, else None."""
if _UUID_RE.match(maybe_uuid):
if _UUID_RE.fullmatch(maybe_uuid):
return maybe_uuid
return None

Expand Down