Fix "Unable to attach mayor" timeout caused by claude being installed as a shell alias rather than in PATH. Non-interactive shells spawned by tmux cannot resolve aliases, causing the session to exit immediately. Changes: - Add resolveClaudePath() to find claude at ~/.claude/local/claude - Apply path resolution in RuntimeConfigFromPreset() for claude preset - Make hasClaudeChild() recursive (now hasClaudeDescendant()) to search entire process subtree as defensive improvement - Update fillRuntimeDefaults() to use DefaultRuntimeConfig() for consistent path resolution Fixes https://github.com/steveyegge/gastown/issues/703 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
1b036aadf5
commit
63a30ce548
@@ -327,10 +327,18 @@ func RuntimeConfigFromPreset(preset AgentPreset) *RuntimeConfig {
|
||||
return DefaultRuntimeConfig()
|
||||
}
|
||||
|
||||
return &RuntimeConfig{
|
||||
rc := &RuntimeConfig{
|
||||
Command: info.Command,
|
||||
Args: append([]string(nil), info.Args...), // Copy to avoid mutation
|
||||
}
|
||||
|
||||
// Resolve command path for claude preset (handles alias installations)
|
||||
// Uses resolveClaudePath() from types.go which finds ~/.claude/local/claude
|
||||
if preset == AgentClaude && rc.Command == "claude" {
|
||||
rc.Command = resolveClaudePath()
|
||||
}
|
||||
|
||||
return rc
|
||||
}
|
||||
|
||||
// BuildResumeCommand builds a command to resume an agent session.
|
||||
|
||||
Reference in New Issue
Block a user