Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

API: Add abort/cancel turn endpoint

Aperta
#136 1 commento 3 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

Start by tracing the existing POST /v1/sessions/{sessionId}/terminate endpoint and the daemon's agent integrations. Compare OpenCode's session.abort() with Claude Code's stdin cancellation, then investigate Codex and Amp support. Done means the abort endpoint cancels only the current turn, preserves the session, and defines the resulting event behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

The Sandbox Agent API needs an abort/cancel turn endpoint so that clients can stop an in-progress turn without terminating the entire session.

Currently, the only way to stop a running agent is POST /v1/sessions/{sessionId}/terminate, which destroys the session entirely. There's no way to cancel just the current turn and continue the conversation.

Proposed API

Add POST /v1/sessions/{sessionId}/abort that:

  1. Cancels the in-progress turn (stops the LLM request / agent subprocess work)
  2. Keeps the session alive so new messages can be sent
  3. Emits a session.ended event with reason: "terminated" for the current turn, or a new event type like turn.aborted

Agent support

  • OpenCode already has a native session.abort() API that does exactly this
  • Claude Code supports Escape to cancel via stdin
  • Codex — needs investigation
  • Amp — needs investigation

The daemon would need to translate the universal abort into the appropriate agent-specific mechanism.

Related

  • Gigacode ESC cancel: needs to call this endpoint once it exists (see linked gigacode issue)

🤖 Generated with Claude Code

Lingua principale
TypeScript
Stelle
1.6k
Fork
131
Merge medio
7h 40m
PR unite (30g)
29

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rivet-dev/agents

Tutte le issue di rivet-dev/agents

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.