Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: Swift iOS: tapping a delegated task in the Agents sheet fails with thread_not_found

オープン 初心者向け
#17,643 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
swift
領域
api, mobile

調査の方向性

apps/swift-ios/Core/OrchestrationV2Client.swift の threadPath(325行目付近)から始めてください。ここではスレッドIDを一度パーセントエンコードしています。次に apps/swift-ios/Core/HTTP.swift の endpoint(767行目付近)を確認してください。ここでは、そのエンコード済みパスを URLComponents.path に代入しており、その結果もう一度エンコードされてしまいます。endpoint で percentEncodedPath を設定するように変更すれば、この問題は修正できるはずです。完了の条件は、スレッドID thread:a%3Ab がリクエストパス /api/orchestration/threads/thread:a%253Ab/bounded になることを示す回帰テストがあり、委任されたタスクのスレッドがアプリで開けることです。

索引モデルが issue の本文から書いたものです。

説明

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
  1. In a thread on a desktop host, have the agent call the delegate_task MCP tool (for example a Codex child task) and let it finish.
  2. On iPhone, open the same thread in the Swift app (TestFlight).
  3. Open the Agents sheet. The delegated task shows as Completed.
  4. 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:

  1. apps/swift-ios/Core/OrchestrationV2Client.swift:325 (threadPath) encodes the ID once. It removes /?#% from .urlPathAllowed, so %3A becomes %253A and : is left alone.
  2. apps/swift-ios/Core/HTTP.swift:767 (endpoint) assigns that already-encoded path to URLComponents.path. That setter expects an unencoded path and escapes % again, so %253A becomes %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.

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
6時間 23分
マージ済み PR(30日)
203

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。