ACP: a content-filtered model response ends the turn with `stopReason: "end_turn"` and sends no message
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- backend-api-design, cli
Hướng nghiên cứu
Trace how copilot --acp turns session events into session/update notifications and maps the final result to stopReason; the issue does not name source files or tests. Compare the ACP path with the interactive CLI handling of finishReason: "content_filter" and assistant.message, then reproduce with the described OpenAI or Anthropic stub. Done when the filtering notice reaches the ACP client and the prompt result reports stopReason: "refusal".
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
When the model's response is blocked by content filtering, copilot --acp sends no session/update for the turn and answers session/prompt with stopReason: "end_turn". The ACP client sees an ordinary finished turn with no reply, and the user gets a blank turn with no explanation.
The interactive CLI handles the same case: the session records finishReason: "content_filter", contentFilterTriggered: true, and an assistant.message that reads "The model returned no content because the response was blocked by content filtering." The ACP layer drops both the message and the stop reason.
Version
GitHub Copilot CLI 1.0.117 (also seen on 1.0.116), Linux x64, ACP protocol version 1 (client offers 2).
Repro
Use a stub BYOK endpoint so no real model call or harmful prompt is needed.
- Run an OpenAI-compatible stub that streams an empty assistant delta, then
finish_reason: "content_filter". (Or an Anthropic stub that streamsmessage_start, thenmessage_deltawithstop_reason: "refusal", thenmessage_stop.) - Start
copilot --acp --allow-allwithCOPILOT_OFFLINE=true,COPILOT_PROVIDER_BASE_URLpointing at the stub, andCOPILOT_PROVIDER_TYPE=openai(oranthropic). - Send
initialize,session/new, thensession/promptwith any text.
Actual
{"jsonrpc":"2.0","id":3,"result":{"stopReason":"end_turn","usage":{"inputTokens":5,"outputTokens":0,"totalTokens":5,"cachedReadTokens":0,"cachedWriteTokens":0}}}
No agent_message_chunk arrives between the prompt and the result. Both stub variants (OpenAI content_filter and Anthropic refusal) give the same output. The session's events.jsonl has the content_filter usage record and the filtering notice as an assistant.message.
A control run with a normal stub reply sends an agent_message_chunk with the text and stopReason: "end_turn", as expected.
Expected
session/promptreturnsstopReason: "refusal". The ACP spec defines it for this case and asks clients to show it.- The filtering notice reaches the client, for example as an
agent_message_chunk, or in_metawith the refusal category when the API supplies one.
Impact
ACP clients such as T3 Code already render stopReason: "refusal" as a visible failure. With end_turn they record a completed turn with no reply, and users read it as a lost answer or a hang.
- Ngôn ngữ chính
- Python
- Star
- 11.5k
- Fork
- 2k
- Merge trung bình
- 6 giờ 34 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/copilot-cli
-
area:plugins
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
github/copilot-cli#5567 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncationĐang mởarea:tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#5476 ·
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
github/copilot-cli#5340 ·
Tất cả issue của github/copilot-cli
Issue tương tự
-
fidelity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
backlog
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sagemathinc/sagebrush#3434 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
wuisabel-gif/MemWhale#576 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Status: Triage Suggestion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
Maintainer thường phản hồi trong vòng 1 ngày