Skip to content

fix(ios): delegated task threads open with literal percent IDs - #23547

Open
juliusmarminge wants to merge 2 commits into
t3code/rebuild-mobile-app-swiftfrom
fix/issue-17643
Open

juliusmarminge wants to merge 2 commits into
t3code/rebuild-mobile-app-swiftfrom
fix/issue-17643

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

Problem

In the SwiftUI app, tapping a completed delegated task in the Agents sheet fails with thread_not_found. Delegated thread IDs contain literal percent escapes; the Swift client escapes the path a second time, so the host looks up a different ID.

Change

Build environment request URLs with an explicitly percent-encoded path helper. Keep the plain-path helper for discovery, pairing, and route probes. Add a regression assertion on the outgoing bounded snapshot URL for a delegated thread ID containing %3A.

Scope and approval

Fixes #17643

Triaged bug via the automated issue flow. Targets t3code/rebuild-mobile-app-swift, which owns the native SwiftUI client.

Verification

  • Real main server at 8d3b061121, isolated synthetic thread projection: the single-encoded bounded request returned HTTP 200 with the original thread ID; the double-encoded request returned HTTP 404 thread_not_found. Runtime transcript.
  • Added V2OrchestrationClientTests.testThreadReadEncodesLiteralPercentInThreadIDOnce in the existing transport test file. Swift tests were not executed: Linux has no Swift compiler or Xcode. No claim of an observed red or green XCTest result.
  • git diff --check passed. Two independent reviews (gpt-6.1-sol and claude-opus-5-5) returned MERGE with no confirmed code findings.
  • No UI rendering code changes. Fixture matrix and evidence index explicitly list the unverified Swift/native rows. Native before/after captures, recordings, visual diffs, and “what else changed” are unavailable; the host transcript does not substitute for them.
Evidence Before After Diff0 DiffT
Native SwiftUI interaction and static rows Not captured (4619c0bca6) Not captured (f8dadbc5f6) Unavailable Unavailable

cannot-verify ios-swift: native build, focused XCTest execution, and opening the delegated child on an Apple runtime remain for Mac verification.

Models: gpt-6.1-sol and claude-opus-5-5. Harnesses: Codex and Claude Agent via T3 Code.

juliusmarminge and others added 2 commits October 22, 2026 10:24
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
threadPath already percent-escapes the thread ID, but makeRequest assigned
the result to URLComponents.path, which escaped every % again. Delegated
child IDs such as command%3Amcp%3A... then 404ed. Environment request paths
are now percent-encoded by contract and set via percentEncodedPath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Oct 22, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at f8dadbc

Macroscope's review found this PR approvable — This is a narrowly scoped iOS URL-encoding fix that preserves percent-encoded delegated-task thread IDs and adds a focused regression test. Existing static API routes and query behavior remain unchanged.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 5.0 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.9 KiB — 29.3 KiB ✅
Codex Live turn messages — 2 — 8 ✅
Claude Total thread wire — 5.0 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 21.2 KiB — 29.3 KiB ✅
Claude Live turn messages — 2 — 8 ✅

Baseline: unavailable · PR result: f8dadbc · Source CI: failure

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant