Problem
squads pause and squads resume return inconsistent JSON error shapes. Agents parsing CLI output in --json mode break because the error shape lacks the command field present in all other commands.
Success shape (correct):
{ "ok": true, "command": "pause", "data": { ... } }
Error shape (missing command):
{ "ok": false, "error": "Squad \"nonexistent\" not found" }
Compare with squads status --json (correct error shape):
{ "ok": false, "command": "status", "error": "Squad \"nonexistent\" not found" }
Agents that route JSON output by command field will fail to identify the source command when errors occur.
Where
src/commands/pause.ts — all error branches in both pauseSquad() and resumeSquad():
// line ~24, ~35:
console.log(JSON.stringify({ ok: false, error: 'No .agents/squads directory found' }));
console.log(JSON.stringify({ ok: false, error: `Squad "${squadName}" not found` }));
Fix
Add command field to all error responses:
// In pauseSquad:
console.log(JSON.stringify({ ok: false, command: 'pause', error: 'No .agents/squads directory found' }));
console.log(JSON.stringify({ ok: false, command: 'pause', error: `Squad "${squadName}" not found` }));
// In resumeSquad:
console.log(JSON.stringify({ ok: false, command: 'resume', error: 'No .agents/squads directory found' }));
console.log(JSON.stringify({ ok: false, command: 'resume', error: `Squad "${squadName}" not found` }));
Labels
type:ux, priority:P2, squad:cli, source:ux-eval
Problem
squads pauseandsquads resumereturn inconsistent JSON error shapes. Agents parsing CLI output in--jsonmode break because the error shape lacks thecommandfield present in all other commands.Success shape (correct):
{ "ok": true, "command": "pause", "data": { ... } }Error shape (missing
command):{ "ok": false, "error": "Squad \"nonexistent\" not found" }Compare with
squads status --json(correct error shape):{ "ok": false, "command": "status", "error": "Squad \"nonexistent\" not found" }Agents that route JSON output by
commandfield will fail to identify the source command when errors occur.Where
src/commands/pause.ts— all error branches in bothpauseSquad()andresumeSquad():Fix
Add
commandfield to all error responses:Labels
type:ux, priority:P2, squad:cli, source:ux-eval