diff --git a/packages/cli/src/shared/agent-setup.ts b/packages/cli/src/shared/agent-setup.ts index d5dc406f..e25e496d 100644 --- a/packages/cli/src/shared/agent-setup.ts +++ b/packages/cli/src/shared/agent-setup.ts @@ -446,6 +446,8 @@ export function createAgents(runner: CloudRunner): Record { ], configure: (apiKey, modelId) => setupOpenclawConfig(runner, apiKey, modelId || "openrouter/auto"), preLaunch: () => startGateway(runner), + preLaunchMsg: + "Set up one channel at a time in the OpenClaw TUI. Wait for each channel to fully complete before pasting the next token — concurrent token pastes can cause setup to hang.", launchCmd: () => "source ~/.spawnrc 2>/dev/null; export PATH=$HOME/.npm-global/bin:$HOME/.bun/bin:$HOME/.local/bin:$PATH; openclaw tui", }, diff --git a/packages/cli/src/shared/agents.ts b/packages/cli/src/shared/agents.ts index 3d4f7914..045c6551 100644 --- a/packages/cli/src/shared/agents.ts +++ b/packages/cli/src/shared/agents.ts @@ -28,6 +28,8 @@ export interface AgentConfig { setup?: (envContent: string, apiKey: string, modelId?: string) => Promise; /** Pre-launch hook (e.g., start gateway daemon). */ preLaunch?: () => Promise; + /** Optional tip or warning shown to the user just before the agent launches. */ + preLaunchMsg?: string; /** Shell command to launch the agent interactively. */ launchCmd: () => string; /** Cloud-init dependency tier. Defaults to "full" if unset. */ diff --git a/packages/cli/src/shared/orchestrate.ts b/packages/cli/src/shared/orchestrate.ts index a579593b..d847e736 100644 --- a/packages/cli/src/shared/orchestrate.ts +++ b/packages/cli/src/shared/orchestrate.ts @@ -130,6 +130,12 @@ export async function runOrchestration(cloud: CloudOrchestrator, agent: AgentCon await agent.preLaunch(); } + // 11b. Agent-specific pre-launch tip (e.g. channel setup ordering hint) + if (agent.preLaunchMsg) { + process.stderr.write("\n"); + logInfo(`Tip: ${agent.preLaunchMsg}`); + } + // 12. Launch interactive session logInfo(`${agent.name} is ready`); process.stderr.write("\n");