Skip to content

v4.4.1 — Guard against clientId nested inside args

Choose a tag to compare

@pranko17 pranko17 released this 29 May 22:39
· 43 commits to main since this release

Patch on top of `v4.4.0`. One DX fix, no API change.

The problem

Agents routinely conflate the wrapper-level `clientId` with the in-app tool's own args — putting `clientId` inside `args: { ... }` instead of at the outer `call` / `wait_until` / `assert` level:

```ts
// wrong — clientId buried in args, silently ignored by the in-app tool
call({ tool: "fiber_tree__query", args: { clientId: "ios-1", scope: "root" } })
```

The dispatch silently succeeded against the auto-picked client and the nested `clientId` was forwarded into the in-app tool, which ignored it — a confusing no-op with no signal.

The fix

  • `detectShadowedOuterArgs` in helpers returns a remediation message with a corrected example when `clientId` is found inside parsed args. Wired into `call`, `wait_until` and `assert` as a hard error — a silent fallback would hide the very bug the agent needs to learn from.
  • `BASE_INSTRUCTIONS` gains a dedicated "Outer vs inner args" section right before Broadcast: explains the two argument layers, gives a wrong/right example, and points at `describe_tool` for the inner schema. Same rule explicitly noted for `wait_until` and `assert`.

Compatibility

Pure addition. Correct calls are unaffected; only the previously-silent mistake now returns an actionable error.