Admin /reset endpoint — manual escape hatch #9
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As ops, I want a
POST /resetendpoint that drops the worktree and session for a given(agent, repo, issue)triple, so that I can force a fresh start without rummaging through~/.cache/and~/.local/state/by hand.Acceptance criteria
Endpoint (
src/main.ts)POST /resetwith JSON body{ "agent": "boss", "repo": "charles/peon", "issue": 4 }400with a clear message if notreleaseWorktree({ keep: false })for the matching(agent, repo, branch-derived-from-issue)dropSession(sessionKey(agent, repo, issue)){ "dropped": { "worktree": <bool>, "session": <bool> } }indicating which existed and were removed{ dropped: { worktree: false, session: false } }) if nothing existed — not a404Auth
/cancel,/task) — currently unauthenticated; if that changes during this work, update consistentlyTests (
src/main.test.ts)truefalse, status200400Out of scope
curlis fine for v1)References
Dependencies
issue-6-sessions-storeclaude-desktop referenced this issue2026-04-16 22:47:31 +00:00