Fix: Claude Code not opening in hive-mind resume (#577)

- Removed --print flag from claudeArgs to enable interactive session
- Changed stdio from 'pipe' to 'inherit' for interactive mode
- Added sessionId parameter to launchClaudeWithContext function
- Made the resume behavior match the initial spawn behavior
- Added proper session management and PID tracking during resume
- Fixed signal handlers for graceful session pausing

This ensures Claude Code opens properly when resuming a hive-mind session
with the --claude flag, matching the behavior of the initial spawn.
This commit is contained in:
rUv committed 2025-08-05 01:26:08 +00:00
1 parent ff7254409c
commit 576690b9ad
5 files changed
+254 -12

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
{
"startTime": 1754357018248,
"startTime": 1754357167172,
"totalTasks": 1,
"successfulTasks": 1,
"failedTasks": 0,
+247 -7
View File
@@ -1,14 +1,254 @@
[
{
"timestamp": 1754357048414,
"timestamp": 1754356555927,
"memoryTotal": 67427545088,
"memoryUsed": 10473164800,
"memoryFree": 56954380288,
"memoryUsagePercent": 15.532472354334455,
"memoryEfficiency": 84.46752764566554,
"memoryUsed": 10270171136,
"memoryFree": 57157373952,
"memoryUsagePercent": 15.23141784651414,
"memoryEfficiency": 84.76858215348587,
"cpuCount": 16,
"cpuLoad": 0.043125,
"cpuLoad": 0.0825,
"platform": "linux",
"uptime": 75364.2
"uptime": 74871.72
},
{
"timestamp": 1754356585935,
"memoryTotal": 67427545088,
"memoryUsed": 10158448640,
"memoryFree": 57269096448,
"memoryUsagePercent": 15.06572518210794,
"memoryEfficiency": 84.93427481789206,
"cpuCount": 16,
"cpuLoad": 0.07,
"platform": "linux",
"uptime": 74901.72
},
{
"timestamp": 1754356615966,
"memoryTotal": 67427545088,
"memoryUsed": 10308452352,
"memoryFree": 57119092736,
"memoryUsagePercent": 15.288191700508138,
"memoryEfficiency": 84.71180829949186,
"cpuCount": 16,
"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
},
{
"timestamp": 1754356736029,
"memoryTotal": 67427545088,
"memoryUsed": 10390425600,
"memoryFree": 57037119488,
"memoryUsagePercent": 15.409764045894608,
"memoryEfficiency": 84.5902359541054,
"cpuCount": 16,
"cpuLoad": 0.165625,
"platform": "linux",
"uptime": 75051.82
},
{
"timestamp": 1754356766045,
"memoryTotal": 67427545088,
"memoryUsed": 10121187328,
"memoryFree": 57306357760,
"memoryUsagePercent": 15.010463920628863,
"memoryEfficiency": 84.98953607937113,
"cpuCount": 16,
"cpuLoad": 0.1075,
"platform": "linux",
"uptime": 75081.83
},
{
"timestamp": 1754356796076,
"memoryTotal": 67427545088,
"memoryUsed": 10135203840,
"memoryFree": 57292341248,
"memoryUsagePercent": 15.031251437038822,
"memoryEfficiency": 84.96874856296118,
"cpuCount": 16,
"cpuLoad": 0.07375,
"platform": "linux",
"uptime": 75111.86
},
{
"timestamp": 1754356826105,
"memoryTotal": 67427545088,
"memoryUsed": 10198450176,
"memoryFree": 57229094912,
"memoryUsagePercent": 15.12505039697049,
"memoryEfficiency": 84.8749496030295,
"cpuCount": 16,
"cpuLoad": 0.080625,
"platform": "linux",
"uptime": 75141.89
},
{
"timestamp": 1754356856136,
"memoryTotal": 67427545088,
"memoryUsed": 10185515008,
"memoryFree": 57242030080,
"memoryUsagePercent": 15.105866593106478,
"memoryEfficiency": 84.89413340689352,
"cpuCount": 16,
"cpuLoad": 0.07375,
"platform": "linux",
"uptime": 75171.92
},
{
"timestamp": 1754356886164,
"memoryTotal": 67427545088,
"memoryUsed": 10484060160,
"memoryFree": 56943484928,
"memoryUsagePercent": 15.548630973168615,
"memoryEfficiency": 84.45136902683139,
"cpuCount": 16,
"cpuLoad": 0.0575,
"platform": "linux",
"uptime": 75201.95
},
{
"timestamp": 1754356916192,
"memoryTotal": 67427545088,
"memoryUsed": 10520784896,
"memoryFree": 56906760192,
"memoryUsagePercent": 15.603096453043449,
"memoryEfficiency": 84.39690354695655,
"cpuCount": 16,
"cpuLoad": 0.0575,
"platform": "linux",
"uptime": 75231.98
},
{
"timestamp": 1754356946222,
"memoryTotal": 67427545088,
"memoryUsed": 10203439104,
"memoryFree": 57224105984,
"memoryUsagePercent": 15.132449343489288,
"memoryEfficiency": 84.86755065651072,
"cpuCount": 16,
"cpuLoad": 0.035,
"platform": "linux",
"uptime": 75262.01
},
{
"timestamp": 1754356976234,
"memoryTotal": 67427545088,
"memoryUsed": 10803937280,
"memoryFree": 56623607808,
"memoryUsagePercent": 16.023032228000787,
"memoryEfficiency": 83.97696777199921,
"cpuCount": 16,
"cpuLoad": 0.038125,
"platform": "linux",
"uptime": 75292.02
},
{
"timestamp": 1754357006237,
"memoryTotal": 67427545088,
"memoryUsed": 10796560384,
"memoryFree": 56630984704,
"memoryUsagePercent": 16.012091749609688,
"memoryEfficiency": 83.98790825039032,
"cpuCount": 16,
"cpuLoad": 0.03875,
"platform": "linux",
"uptime": 75322.03
},
{
"timestamp": 1754357036256,
"memoryTotal": 67427545088,
"memoryUsed": 10492620800,
"memoryFree": 56934924288,
"memoryUsagePercent": 15.561327030824025,
"memoryEfficiency": 84.43867296917597,
"cpuCount": 16,
"cpuLoad": 0.050625,
"platform": "linux",
"uptime": 75352.05
},
{
"timestamp": 1754357066287,
"memoryTotal": 67427545088,
"memoryUsed": 10529107968,
"memoryFree": 56898437120,
"memoryUsagePercent": 15.615440179912248,
"memoryEfficiency": 84.38455982008776,
"cpuCount": 16,
"cpuLoad": 0.04,
"platform": "linux",
"uptime": 75382.08
},
{
"timestamp": 1754357096316,
"memoryTotal": 67427545088,
"memoryUsed": 10228994048,
"memoryFree": 57198551040,
"memoryUsagePercent": 15.170349201724745,
"memoryEfficiency": 84.82965079827525,
"cpuCount": 16,
"cpuLoad": 0.05,
"platform": "linux",
"uptime": 75412.1
},
{
"timestamp": 1754357126347,
"memoryTotal": 67427545088,
"memoryUsed": 10225238016,
"memoryFree": 57202307072,
"memoryUsagePercent": 15.164778730495074,
"memoryEfficiency": 84.83522126950493,
"cpuCount": 16,
"cpuLoad": 0.0375,
"platform": "linux",
"uptime": 75442.14
},
{
"timestamp": 1754357156376,
"memoryTotal": 67427545088,
"memoryUsed": 10463055872,
"memoryFree": 56964489216,
"memoryUsagePercent": 15.51748007189735,
"memoryEfficiency": 84.48251992810265,
"cpuCount": 16,
"cpuLoad": 0.054375,
"platform": "linux",
"uptime": 75472.16
}
]
+4 -4
View File
@@ -1,10 +1,10 @@
[
{
"id": "cmd-hive-mind-1754357018344",
"type": "hive-mind",
"id": "cmd-hooks-1754357167275",
"type": "hooks",
"success": true,
"duration": 43.913617000000016,
"timestamp": 1754357018388,
"duration": 7.271429000000012,
"timestamp": 1754357167282,
"metadata": {}
}
]
+1
View File
@@ -0,0 +1 @@
{"branch": "checkpoint/pre-edit-20250805-012537", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/hive-mind.js", "timestamp": "2025-08-05T01:25:37Z", "type": "pre-edit", "original_branch": "alpha-85"}
+1
View File
@@ -0,0 +1 @@
{"tag": "checkpoint-20250805-012539", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/hive-mind.js", "timestamp": "2025-08-05T01:25:39Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 242 ++++++++++++++++++++++++++++++- .claude-flow/metrics/task-metrics.json | 8 +- .claude/checkpoints/1754357126.json | 1 + .claude/checkpoints/1754357128.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/hive-mind.js | 2 +- 7 files changed, 243 insertions(+), 13 deletions(-) "}