fix: interrupt running agents before archive

This commit is contained in:
Mohamed Boudra
2026-02-20 13:34:06 +07:00
parent e22647af62
commit 6dad3212da
4 changed files with 94 additions and 2 deletions
+2 -1
View File
@@ -83,7 +83,8 @@ export async function runArchiveCommand(
const error: CommandError = {
code: 'AGENT_RUNNING',
message: `Agent ${agentId.slice(0, 7)} is currently running`,
details: 'Use --force to archive a running agent, or stop it first with: paseo agent stop',
details:
'Use --force to archive a running agent (it will interrupt the active run), or stop it first with: paseo agent stop',
}
throw error
}
+1 -1
View File
@@ -117,7 +117,7 @@ export function createAgentCommand(): Command {
.command('archive')
.description('Archive an agent (soft-delete)')
.argument('<id>', 'Agent ID (or prefix)')
.option('--force', 'Force archive running agent')
.option('--force', 'Force archive running agent (interrupts active run first)')
.option('--json', 'Output in JSON format')
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
.action(withOutput(runArchiveCommand))