From 940319f28a186813869b6d4c568a2d7435a2097a Mon Sep 17 00:00:00 2001 From: 0xallam Date: Sun, 24 May 2026 18:10:57 -0700 Subject: [PATCH] Align note IDs with todo IDs (6-char hex) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notes generated 5-char IDs via a 20-try collision loop while todos generated 6-char IDs in one shot. Mixed widths across the agent's view made the two tools look unrelated. Match todo's shape — same length, same one-shot generation. Collision retry is unnecessary at scan-scale (a few hundred items vs 16^6 keys). Co-Authored-By: Claude Opus 4.7 (1M context) --- strix/tools/notes/tools.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/strix/tools/notes/tools.py b/strix/tools/notes/tools.py index aa21928..9027a6f 100644 --- a/strix/tools/notes/tools.py +++ b/strix/tools/notes/tools.py @@ -176,14 +176,7 @@ def _create_note_impl( "note_id": None, } - note_id = "" - for _ in range(20): - candidate = str(uuid.uuid4())[:5] - if candidate not in _notes_storage: - note_id = candidate - break - if not note_id: - return {"success": False, "error": "Failed to allocate note ID", "note_id": None} + note_id = str(uuid.uuid4())[:6] timestamp = datetime.now(UTC).isoformat() note = {