Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

API: Add abort/cancel turn endpoint

Đang mở
#136 1 bình luận 3 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
api, backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
1.6k
Fork
131
Merge trung bình
7 giờ 40 phút
Pull request đã merge (30 ngày)
29

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rivet-dev/agents

Tất cả issue của rivet-dev/agents

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.