mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 06:06:02 +09:00
3.0 KiB
3.0 KiB
GitHub Issue #577 Response
Fixed: Hive Mind Session Resume Issues
Thank you for reporting these issues! I've implemented fixes for all the problems mentioned:
✅ Fixed Issues:
-
"Cannot read properties of null (reading 'prepare')" error
- Fixed missing
awaiton line 503 insession-manager.js - Added proper async/await handling throughout the session manager
- Implemented database initialization checks before accessing
db.prepare()
- Fixed missing
-
Missing --dangerously-skip-permissions flag
- Changed condition from
flags['dangerously-skip-permissions'] !== falseto!flags['no-auto-permissions'] - Flag now consistently applies for both initial spawn and resume operations
- Changed condition from
-
Claude Code not opening when resuming
- Removed
--printflag which was causing non-interactive mode - Changed stdio from 'pipe' to 'inherit' to match initial spawn behavior
- Added sessionId parameter to launchClaudeWithContext function
- Removed
-
Enhanced session restoration context
- Significantly improved the
generateRestoredSessionPromptfunction - Now displays comprehensive session details including:
- All agents (active and idle) with their current tasks
- Complete task breakdown by status (completed, in-progress, pending)
- Extended activity history (20 entries instead of 10)
- Session metadata and timeline information
- Checkpoint history with timestamps
- Task assignments and priorities
- Significantly improved the
🔍 Still Investigating:
- Multiple CLI spawning issue: Added debug logging to track spawn calls. This appears to be a race condition or Claude Code triggering multiple instances. Further investigation needed.
Changes Made:
File: src/cli/simple-commands/hive-mind/session-manager.js
// Line 503 - Fixed missing await
const session = await this.getSession(sessionId);
// Added initialization promise tracking
this.initializationPromise = this.initializeDatabase();
// Enhanced ensureInitialized method
async ensureInitialized() {
if (this.initializationPromise) {
await this.initializationPromise;
this.initializationPromise = null;
}
// ... rest of initialization
}
File: src/cli/simple-commands/hive-mind.js
// Simplified permissions flag condition
if (!flags['no-auto-permissions']) {
claudeArgs.push('--dangerously-skip-permissions');
}
// Fixed Claude spawn for interactive session
const claudeArgs = [prompt]; // No --print flag
const claudeProcess = childSpawn('claude', claudeArgs, {
stdio: 'inherit', // Changed from 'pipe'
shell: false,
});
// Enhanced session prompt generation with comprehensive details
function generateRestoredSessionPrompt(session) {
// Now includes all agents, complete task history,
// extended logs, metadata, and more context
}
The fixes should resolve the session resume issues on both macOS and Debian. Please test and let me know if you encounter any remaining problems, especially regarding the multiple CLI spawning issue.