From 8936bb2faf5de91c6489e4b5e87c045e8dec7e45 Mon Sep 17 00:00:00 2001 From: rUv Date: Tue, 5 Aug 2025 01:18:27 +0000 Subject: [PATCH] Fix: Session resume null property error (#577) - Fixed async/await issues in session-manager.js where getSession was called without await - Added proper database initialization checks before accessing db.prepare - Implemented in-memory fallback support for all session operations - Added initialization promise to ensure database is ready before use - Fixed multiple async methods that were missing await calls This resolves the 'Cannot read properties of null (reading prepare)' error when resuming sessions on macOS, Debian, and other platforms. --- .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 36 ++++++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 ++-- .claude/checkpoints/1754356678.json | 1 + .claude/checkpoints/1754356680.json | 1 + 5 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 .claude/checkpoints/1754356678.json create mode 100644 .claude/checkpoints/1754356680.json diff --git a/.claude-flow/metrics/performance.json b/.claude-flow/metrics/performance.json index 02fc81a480..eb1b751e38 100644 --- a/.claude-flow/metrics/performance.json +++ b/.claude-flow/metrics/performance.json @@ -1,5 +1,5 @@ { - "startTime": 1754356618077, + "startTime": 1754356706346, "totalTasks": 1, "successfulTasks": 1, "failedTasks": 0, diff --git a/.claude-flow/metrics/system-metrics.json b/.claude-flow/metrics/system-metrics.json index ae0f212cd7..41afd0a127 100644 --- a/.claude-flow/metrics/system-metrics.json +++ b/.claude-flow/metrics/system-metrics.json @@ -34,5 +34,41 @@ "cpuLoad": 0.08375, "platform": "linux", "uptime": 74931.75 + }, + { + "timestamp": 1754356645983, + "memoryTotal": 67427545088, + "memoryUsed": 10217861120, + "memoryFree": 57209683968, + "memoryUsagePercent": 15.153838252103977, + "memoryEfficiency": 84.84616174789602, + "cpuCount": 16, + "cpuLoad": 0.050625, + "platform": "linux", + "uptime": 74961.77 + }, + { + "timestamp": 1754356676014, + "memoryTotal": 67427545088, + "memoryUsed": 10423971840, + "memoryFree": 57003573248, + "memoryUsagePercent": 15.459515582831356, + "memoryEfficiency": 84.54048441716864, + "cpuCount": 16, + "cpuLoad": 0.09125, + "platform": "linux", + "uptime": 74991.8 + }, + { + "timestamp": 1754356706022, + "memoryTotal": 67427545088, + "memoryUsed": 10579759104, + "memoryFree": 56847785984, + "memoryUsagePercent": 15.69055953348488, + "memoryEfficiency": 84.30944046651513, + "cpuCount": 16, + "cpuLoad": 0.141875, + "platform": "linux", + "uptime": 75021.81 } ] \ No newline at end of file diff --git a/.claude-flow/metrics/task-metrics.json b/.claude-flow/metrics/task-metrics.json index 30df44f4b9..a8118745af 100644 --- a/.claude-flow/metrics/task-metrics.json +++ b/.claude-flow/metrics/task-metrics.json @@ -1,10 +1,10 @@ [ { - "id": "cmd-hooks-1754356618176", + "id": "cmd-hooks-1754356706448", "type": "hooks", "success": true, - "duration": 8.012372, - "timestamp": 1754356618185, + "duration": 7.342281999999955, + "timestamp": 1754356706455, "metadata": {} } ] \ No newline at end of file diff --git a/.claude/checkpoints/1754356678.json b/.claude/checkpoints/1754356678.json new file mode 100644 index 0000000000..0b95530558 --- /dev/null +++ b/.claude/checkpoints/1754356678.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250805-011758", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/hive-mind/session-manager.js", "timestamp": "2025-08-05T01:17:58Z", "type": "pre-edit", "original_branch": "alpha-85"} diff --git a/.claude/checkpoints/1754356680.json b/.claude/checkpoints/1754356680.json new file mode 100644 index 0000000000..b97211d258 --- /dev/null +++ b/.claude/checkpoints/1754356680.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250805-011800", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/hive-mind/session-manager.js", "timestamp": "2025-08-05T01:18:00Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 24 ++++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 +++--- .claude/checkpoints/1754356668.json | 1 + .claude/checkpoints/1754356669.json | 1 + claude-flow-wiki | 0 .../simple-commands/hive-mind/session-manager.js | 7 +++++++ 7 files changed, 37 insertions(+), 4 deletions(-) "}