fix: interrupt running agents before archive
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user