`session_store_sql` returns deleted sessions forever: no DELETE verb on `POST /agents/analytics/query` or `/agents/sessions/*`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
The issue involves the session data pipeline and API routes. Start by examining the API routes listed in the issue, particularly /agents/analytics/query and /agents/sessions/* in the codebase. Look for where session data is written and queried, and understand the data flow from CLI to cloud storage. Check related issues #3811, #4094, #4939, #3777 for additional context. The goal is to add a DELETE route or cascade deletion from tasks to sessions.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
The session_store_sql tool with source: "cloud" keeps returning sessions
after they have been deleted everywhere the user can reach:
SELECT COUNT(*) FROM sessions
→ 482, while GET /agents/tasks returns 0 tasks.
These rows are served by POST https://api.githubcopilot.com/agents/analytics/query
and written by chronicle reindex via PUT /agents/sessions/{id},
POST /agents/sessions/{id}/events, and PUT /agents/sessions/{id}/logs.
Every one of those write routes is an upsert or append. No route accepts
DELETE, and POST /agents/analytics/query rejects any non-SELECT
statement. Once a row exists in the sessions table behind
/agents/analytics/query, no client operation can remove it.
OPTIONS against every route the CLI uses for session data:
| Route | Allow: |
|---|---|
/agents/analytics/query |
POST |
/agents/analytics |
GET, POST |
/agents/sessions |
GET, POST, PATCH |
/agents/sessions/{id} |
PUT, GET |
/agents/sessions/{id}/events |
GET, POST |
/agents/sessions/{id}/logs |
PUT, GET |
DELETE appears on none of them.
Affected version
Copilot CLI 1.0.87 (Linux x64)
Steps to reproduce the behavior
- Accumulate CLI sessions with
remoteExportenabled (the default). - Delete the corresponding Mission Control tasks:
DELETE https://api.githubcopilot.com/agents/tasks/{id}(the call the CLI's
session picker makes), or via github.com/copilot/agent WebUI. - Delete all local session state under
~/.copilot/session-state/. - Set
remoteExporttofalse. - Run
session_store_sqlwithsource: "cloud":SELECT COUNT(*) FROM sessions
Every previously-exported session is still returned. /chronicle and
cross-session search surface the same rows.
Expected behavior
Sessions deleted from github.com/copilot/tasks, from the CLI session picker,
and from ~/.copilot/session-state/ should stop being returned by
session_store_sql, /chronicle, and cross-session search.
Setting remoteExport: false should also provide some supported way to remove
data already exported — or the retention policy for that data should be
documented.
One of:
- A
DELETEroute for rows in thesessionstable — ideally bulk, e.g.
DELETE /agents/sessions/{id}plus a "delete all my cloud session history"
operation. DELETE /agents/tasks/{id}cascading to the matchingsessionsrow.
Additional context
Impact
- Deletion is not honored. Session metadata, titles, and summaries remain
queryable after deletion from every user-reachable surface. remoteExport: falseis not retroactive. It stops new writes but leaves
every prior row in place, with no documented retention period.- No recourse exists through the CLI, the web UI, or the API.
Related issues
These look like the same gap — deletion never reaching the append-only
/agents/sessions/* → /agents/analytics/query pipeline:
| Issue | Title | Relationship |
|---|---|---|
| #3811 | deleted sessions still in /chronicle insights | Closest match — same symptom (local wipe + cloud delete + remoteExport off, yet /chronicle still surfaces deleted sessions); does not identify the route-level cause |
| #4094 | Deleting a session doesn't remove it from session-store.db / VS Code Chat history | Self-describes as the same root cause as #3811 |
| #4939 | Unable to delete old remote sessions | Same family; notes deletion worked in v1.0.55 |
| #3777 | /chronicle reindex queues remote backfill despite local-only remote settings | Shows remoteExport: false is not fully honored by the sync pipeline |
Adding a DELETE route would likely resolve #3811 and #4094 as well.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
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
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
github/copilot-cli#4932 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github/copilot-cli#4909 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/copilot-cli#4906 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#4848 ·
-
area:agents area:mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#4729 ·
Tất cả issue của github/copilot-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elastic/gradle-plugins#156 ·
-
Priority/High ready-for-agent Severity/Major Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
comp/cli P3 type/docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#119756 · 1 bình luận ·
-
comp: build/pipeline type: bug version: current (v17+)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
angular/angularfire#3766 ·
-
out-of-date
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
CachyOS/CachyOS-PKGBUILDS#1903 ·