[Bug]: Swift iOS: tapping a delegated task in the Agents sheet fails with thread_not_found
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 70/100
Hướng nghiên cứu
Bắt đầu từ apps/swift-ios/Core/OrchestrationV2Client.swift tại threadPath (khoảng dòng 325), nơi ID thread được mã hóa phần trăm một lần, sau đó đến apps/swift-ios/Core/HTTP.swift tại endpoint (khoảng dòng 767), nơi đường dẫn đã mã hóa được gán cho URLComponents.path và bị mã hóa thêm lần nữa. Đổi endpoint để đặt percentEncodedPath sẽ khắc phục được lỗi. Hoàn thành khi một test hồi quy cho thấy ID thread thread:a%3Ab tạo ra đường dẫn yêu cầu /api/orchestration/threads/thread:a%253Ab/bounded và các thread của tác vụ được ủy quyền mở được trong ứng dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Opened on behalf of Ben by Claude Code (Opus 5.5).
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/mobile (experimental SwiftUI client, apps/swift-ios)
Steps to reproduce
- In a thread on a desktop host, have the agent call the
delegate_taskMCP tool (for example a Codex child task) and let it finish. - On iPhone, open the same thread in the Swift app (TestFlight).
- Open the Agents sheet. The delegated task shows as Completed.
- Tap the task row.
Expected behavior
The child thread opens, the same as it does on web and desktop.
Actual behavior
The app shows Could not open thread: thread_not_found. The child thread exists. t3_thread_read and desktop both open it.
Delegated-task thread IDs contain literal % characters, for example thread:delegated-task:command%3Amcp%3A<uuid>%3Adelegate-task%3A<clientRequestId>. The Swift client percent-encodes the ID twice, so it requests a thread that does not exist:
GET /api/orchestration/threads/thread:delegated-task:command%25253Amcp%25253A…/bounded
The server decodes the path once and looks up command%253Amcp… instead of command%3Amcp….
On t3code/rebuild-mobile-app-swift @ 52912fe7e3:
apps/swift-ios/Core/OrchestrationV2Client.swift:325(threadPath) encodes the ID once. It removes/?#%from.urlPathAllowed, so%3Abecomes%253Aand:is left alone.apps/swift-ios/Core/HTTP.swift:767(endpoint) assigns that already-encoded path toURLComponents.path. That setter expects an unencoded path and escapes%again, so%253Abecomes%25253A.
HTTPClient.threadSnapshot (HTTP.swift:274) pre-encodes with .urlPathAllowed and goes through the same endpoint, so it double-encodes too. Ordinary thread IDs are UUIDs with nothing to escape, which is why only delegated-task children (and any other ID containing %) hit this.
A likely fix is to set components.percentEncodedPath = path in endpoint and keep the per-segment encoding in threadPath. Fixed paths such as /api/orchestration/shell are already valid encoded paths, so they are unaffected. A regression test could assert that thread ID thread:a%3Ab produces the request path /api/orchestration/threads/thread:a%253Ab/bounded.
Impact
Major degradation or frequent failure
Version or commit
Swift app: TestFlight build 60 (code reference: t3code/rebuild-mobile-app-swift @ 52912fe7e3). Server: 0.0.46-nightly.20261008.2849.
Environment
iOS 27, iPhone. macOS host running the Nightly desktop app, connected over Tailscale HTTPS. Child task: Codex gpt-6.1-sol.
Logs or stack traces
# server.trace.ndjson, http.server GET
http.route: /api/orchestration/threads/:threadId/bounded
url.path: /api/orchestration/threads/thread:delegated-task:command%25253Amcp%25253A9dd2e492-724d-437f-b41a-cdc6ec10ec65%25253Adelegate-task%25253Averify-t3-workflow-vs-flowition-r1/bounded
user_agent: T3Code/60 CFNetwork/3896.100.1.2.1 Darwin/27.0.0
# sql.transaction failure
ProjectionStoreThreadNotFoundError: No orchestration projection exists for thread thread:delegated-task:command%253Amcp%253A9dd2e492-724d-437f-b41a-cdc6ec10ec65%253Adelegate-task%253Averify-t3-workflow-vs-flowition-r1.
# actual thread ID
thread:delegated-task:command%3Amcp%3A9dd2e492-724d-437f-b41a-cdc6ec10ec65%3Adelegate-task%3Averify-t3-workflow-vs-flowition-r1
Workaround
Open the child thread from desktop or web.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 7 giờ 9 phút
- Pull request đã merge (30 ngày)
- 244
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- 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 pingdotgg/t3code
-
[Bug]: Diff panel hides the current branch name and the arrow overlaps the base ref when the panel is narrowCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởaccepted bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#19048 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Windows repository cloning fails while creating an existing drive rootCó thể đã có người làm @pujitha24 đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: iOS still shows "Failed to connect. Retrying" on every resume (follow-up to #5695)Có thể đã có người làm @otavio đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Server git tests sign fixture commits with the developer's key when run from the repo rootCó thể đã có người làm @Mnigos đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingdotgg/t3code
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NaturalIntelligence/fast-xml-parser#890 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
zsviczian/obsidian-excalidraw-plugin#3000 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pnpm/get.pnpm.io#68 ·
-
[BUG] Cloudflare KV binding 模式下 kvDriver.list() 沿用 EdgeOne 语义,字段名不匹配导致 key 格式下初始化 500 并耗尽 list 配额Có thể đã có người làm @wumingzhinu đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
OpenListTeam/OpenList-Worker#125 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
margelo/react-native-vision-camera#4217 ·
Maintainer thường phản hồi trong vòng 4 ngày