Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/cli/commands/dev/browser-mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ export async function launchBrowserDev(): Promise<void> {
process.exit(1);
}

await runCliDeploy();
if (hasHarnesses) {
await runCliDeploy();
}

const configRoot = findConfigRoot(workingDir);
const persistTracesDir = path.join(configRoot ?? workingDir, '.cli', 'traces');
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/dev/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ export const registerDev = (program: Command) => {
// Get provider info from agent config
const providerInfo = '(see agent code)';

// Deploy resources before starting dev server
if (!opts.skipDeploy) {
// Deploy resources before starting dev server (only when harnesses need it)
if (!opts.skipDeploy && hasHarnesses) {
await runCliDeploy();
}

Expand Down
13 changes: 13 additions & 0 deletions src/cli/tui/hooks/useDevDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ export function useDevDeploy({ skip, ready = true }: UseDevDeployOptions = {}):
try {
const configIO = new ConfigIO();

// Only deploy if the project has harnesses (cloud-dependent resources).
// Plain agents (Strands, LangGraph, etc.) run locally and don't need deployment.
try {
const projectSpec = await configIO.readProjectSpec();
const hasHarnesses = (projectSpec.harnesses ?? []).length > 0;
if (!hasHarnesses) {
onProgress('Local agent — no deploy needed', 'success');
return;
}
} catch {
// If we can't read project spec, proceed with deploy as a safe default
}

// Auto-populate aws-targets.json if empty
try {
const targets = await configIO.readAWSDeploymentTargets();
Expand Down
Loading