What Changed
- Classify canonical
dynamic_tool_call approval requests as command when the server projects provider runtime events, so persisted approval activities carry an actionable requestKind.
- Add the same
dynamic_tool_call fallback to mobile approval derivation for older servers and already-persisted activities that do not carry requestKind.
- Add focused regression coverage for both the server projection and the mobile fallback.
Why
Providers can emit approval-required tools as dynamic_tool_call (Claude Agent already does this today). Web already treated that request type as an actionable command approval, but mobile did not. At the same time, orchestration did not stamp a requestKind for these events, so the phone could receive an approval.requested activity and silently drop it instead of rendering the existing approval card.
The fix is intentionally two-sided: new server projections are self-describing, while mobile remains compatible with older servers and historical snapshots.
Verification
vp test run apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.approval.test.ts apps/mobile/src/lib/threadActivity.test.ts — 84 passed
- Existing Claude adapter regression confirms Agent-tool approvals emit
dynamic_tool_call
- Server and mobile typechecks passed
- Targeted lint, formatting, and
git diff --check passed
Checklist
- This PR is small and focused
- I explained what changed and why
Built and verified with GPT-5.6 Sol through the T3 Code harness.
Note
Low Risk
Narrow classification change for one approval request type, with server and mobile regression tests; no auth or data-model changes.
Overview
Dynamic tool approval requests (requestType: dynamic_tool_call) are now treated like command approvals on both server ingestion and mobile pending-approval derivation, so they show up in the approval UI instead of being dropped when requestKind is missing.
On the server, requestKindFromCanonicalRequestType maps dynamic_tool_call to command, so new approval.requested activities are persisted with an actionable requestKind and the usual “Command approval requested” summary.
On mobile, the same mapping is applied in requestKindFromRequestType when activities only carry requestType (older servers or historical snapshots). Regression tests cover both paths.
Reviewed by Cursor Bugbot for commit 5a6d125. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix dynamic tool approvals surfacing as command approvals on mobile and server
- Adds
dynamic_tool_call to the command request-kind cases in both requestKindFromRequestType (mobile) and requestKindFromCanonicalRequestType (server).
- Dynamic tool requests are now classified as command approvals so they appear in pending approvals and are ingested as actionable
approval.requested activities.
- Adds regression tests on both sides covering the new classification and persisted activity fields.
Macroscope summarized 5a6d125.