fix: respect Claude CLI startup mode setting (#12)

The "Startup Mode" setting (normal/bypass/allowedTools) was saved to
settings but never read when spawning sessions. All code paths had
--dangerously-skip-permissions hardcoded. Now reads claudeMode from
~/.claudeman/settings.json and passes it through Session → TmuxManager.

Closes #12

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-02-24 15:52:55 +01:00
co-authored by Claude Opus 4.6
parent 5be891a913
commit 5170c188c3
7 changed files with 121 additions and 16 deletions
+4 -2
View File
@@ -7,7 +7,7 @@
*/
import type { EventEmitter } from 'node:events';
import type { ProcessStats, PersistedRespawnConfig, NiceConfig } from './types.js';
import type { ProcessStats, PersistedRespawnConfig, NiceConfig, ClaudeMode } from './types.js';
/**
* Multiplexer session metadata.
@@ -71,6 +71,8 @@ export interface TerminalMultiplexer extends EventEmitter {
name?: string,
niceConfig?: NiceConfig,
model?: string,
claudeMode?: ClaudeMode,
allowedTools?: string,
): Promise<MuxSession>;
/**
@@ -163,5 +165,5 @@ export interface TerminalMultiplexer extends EventEmitter {
isPaneDead(muxName: string): boolean;
/** Respawn a dead pane with a fresh command. Returns the new PID or null on failure. */
respawnPane(sessionId: string, workingDir: string, mode: 'claude' | 'shell', niceConfig?: NiceConfig, model?: string): Promise<number | null>;
respawnPane(sessionId: string, workingDir: string, mode: 'claude' | 'shell', niceConfig?: NiceConfig, model?: string, claudeMode?: ClaudeMode, allowedTools?: string): Promise<number | null>;
}