mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-07 07:59:42 +02:00
fix: robust agent-to-tab connection lines with persistent parent tracking
- Add --session-id flag to Claude CLI startup so Claudeman and Claude share the same session ID - Set claudeSessionId immediately on session start (no waiting for JSON messages) - Add persistent subagentParentMap to store agent-to-tab associations permanently - Add /api/subagent-parents endpoints for server-side persistence - Add fallback: use active session when claudeSessionId matching fails - Connection lines now reliably connect agent windows to their parent tabs - Survives page refresh, reconnect, and server restart Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -266,8 +266,10 @@ export class ScreenManager extends EventEmitter {
|
||||
].join(' && ');
|
||||
|
||||
// Base command for the mode (just the executable, env vars are exported separately)
|
||||
// For Claude sessions: pass --session-id to use the SAME ID as the Claudeman session
|
||||
// This ensures subagents (discovered via file path) can be directly matched to the correct tab
|
||||
const baseCmd = mode === 'claude'
|
||||
? 'claude --dangerously-skip-permissions'
|
||||
? `claude --dangerously-skip-permissions --session-id ${sessionId}`
|
||||
: '$SHELL';
|
||||
|
||||
// Apply nice priority if configured
|
||||
|
||||
Reference in New Issue
Block a user