mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-26 01:39:51 +01:00
## Thinking Path - The server already exposes a permission-checked agent clear-error endpoint. - The CLI previously required operators to call that endpoint manually. - A thin CLI wrapper provides the same action without duplicating lifecycle policy. ## Linked Issues or Issue Description **Problem or motivation** The CLI exposes pause and resume but not the existing `POST /api/agents/:id/clear-error` action. **Proposed solution** Expose `paperclipai agent clear-error <agent-id>` with standard authentication and output. **Alternatives considered** Direct REST calls work but bypass normal CLI ergonomics; generic agent PATCH is not equivalent. **Roadmap alignment** This exposes an existing server capability rather than adding a new lifecycle policy. ## What Changed - Add `agent clear-error` to the CLI and usage documentation. - Test the API path, JSON output, forbidden (403) and invalid-state (409) replies without retries or extra actions. ## Verification - CLI lifecycle tests **10/10 passed** and typecheck passed. - GitHub CI: **55 passed, 3 skipped, 0 failed** on `3b8fd71739b8`; Greptile **5/5**. ## Risks - The endpoint remains subject to server authorization and agent-state checks. Clearing an error does not cure its underlying cause. ## Model Used PR history records Anthropic Claude Sonnet 5.5 and OpenAI GPT-6.1 Sol with tool-assisted review. ## Checklist - [x] Searched similar open and closed PRs; no duplicate was found. - [x] Focused tests, changed behavior and risks are documented. - [x] All required CI checks pass on the current head. - [x] Greptile review is 5/5 with no open actionable findings. - [ ] Upstream maintainer approval (not yet requested as a merge). --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>