Skip to content

Commit 41bcc51

Browse files
gastown/crew/navaniclaude
authored andcommitted
fix(polecat): don't pre-build command for agent override
When --agent is specified, StartSession() pre-built the command via BuildPolecatStartupCommandWithAgentOverride with an EMPTY prompt. This set opts.Command, causing session_manager.Start() to skip its own BuildStartupCommandFromConfig (which includes the beacon prompt). Result: agent launched without work instructions (no -i flag, no prompt), sitting idle at the input prompt. Fix: remove the pre-built command path. Let session_manager.Start() build the command with both the beacon prompt and agent override (opts.Agent), which was already being passed through correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 00f59c9 commit 41bcc51

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

internal/cmd/polecat_spawn.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,11 @@ func (s *SpawnedPolecatInfo) StartSession() (string, error) {
358358
RuntimeConfigDir: claudeConfigDir,
359359
Agent: s.agent,
360360
}
361-
if s.agent != "" {
362-
cmd, err := config.BuildPolecatStartupCommandWithAgentOverride(s.RigName, s.PolecatName, r.Path, "", s.agent)
363-
if err != nil {
364-
return "", err
365-
}
366-
startOpts.Command = cmd
367-
}
361+
// Note: when agent override is specified, we set startOpts.Agent instead of
362+
// pre-building the command. This allows session_manager.Start() to build the
363+
// command with the beacon prompt included. Previously, pre-building here with
364+
// an empty prompt caused the agent to launch without work instructions.
365+
368366
if err := polecatSessMgr.Start(s.PolecatName, startOpts); err != nil {
369367
return "", fmt.Errorf("starting session: %w", err)
370368
}

0 commit comments

Comments
 (0)