[v2] Minor task-related refactors #1758
Merged
Claude / Claude Code Review
completed
Mar 27, 2026 in 10m 35s
Code review found 1 potential issue
Found 5 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | docs/migration.md:770-774 |
Migration doc v1 example uses task: { ttl: null } in params but TaskMetadataSchema never accepted null |
Annotations
Check warning on line 774 in docs/migration.md
claude / Claude Code Review
Migration doc v1 example uses task: { ttl: null } in params but TaskMetadataSchema never accepted null
The v1 "before" example places `task: { ttl: null }` inside the first argument (params) of `callTool()`, but `params.task` is validated against `TaskMetadataSchema` which defines `ttl` as `z.number().optional()` — it never accepted `null`, even in v1. The null-accepting type was `TaskCreationParams`, used via the second argument (`RequestOptions`). The correct v1 pattern would be: `client.callTool({ name: 'long-task', arguments: {} }, { task: { ttl: null } })`.
Loading