openclaw - 💡(How to fix) Fix [Bug]: 2026.4.22 passes tools: [] to Pi embedded sessions and disables customTools [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70485Fetched 2026-04-24 05:57:28
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Timeline (top)
commented ×2labeled ×2closed ×1
  1. Start from a pre-2026.4.22 OpenClaw build where Pi embedded tool calling works.
  2. Update to OpenClaw 2026.4.22.
  3. Run turns that require local/custom tool execution through Pi embedded sessions.
  4. Observe that usable tool calling disappears across configured model/provider paths.After updating to OpenClaw 2026.4.22, usable tool calling disappeared across all configured model/provider paths because Pi embedded sessions were created with tools: [] and customTools were no longer usable.

Root Cause

  1. Start from a pre-2026.4.22 OpenClaw build where Pi embedded tool calling works.
  2. Update to OpenClaw 2026.4.22.
  3. Run turns that require local/custom tool execution through Pi embedded sessions.
  4. Observe that usable tool calling disappears across configured model/provider paths.After updating to OpenClaw 2026.4.22, usable tool calling disappeared across all configured model/provider paths because Pi embedded sessions were created with tools: [] and customTools were no longer usable.

Code Example

Observed code-level change:

`d7ea136384` changed Pi embedded session creation to pass:


tools: builtInTools
customTools: allCustomTools


At these call sites, `builtInTools` is `[]`.

Pi treats `tools` as a tool-name allowlist, so `tools: []` silently strips `customTools`.

Relevant call sites:
- `src/agents/pi-embedded-runner/run/attempt.ts`
- `src/agents/pi-embedded-runner/compact.ts`
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

  1. Start from a pre-2026.4.22 OpenClaw build where Pi embedded tool calling works.
  2. Update to OpenClaw 2026.4.22.
  3. Run turns that require local/custom tool execution through Pi embedded sessions.
  4. Observe that usable tool calling disappears across configured model/provider paths.After updating to OpenClaw 2026.4.22, usable tool calling disappeared across all configured model/provider paths because Pi embedded sessions were created with tools: [] and customTools were no longer usable.

Steps to reproduce

  1. Start from a pre-2026.4.22 OpenClaw build where Pi embedded tool calling works.
  2. Update to OpenClaw 2026.4.22.
  3. Run turns that require local/custom tool execution through Pi embedded sessions.
  4. Observe that usable tool calling disappears across configured model/provider paths.

Expected behavior

Observed before 2026.4.22: the same tool-required turns emitted structured toolCall/toolResult records and local/custom tools remained usable.

Actual behavior

Usable tool calling disappeared across all configured model/provider paths after the update.

Observed results:

  • GPT path reported no usable local tools
  • Grok emitted tool calls as plain text
  • Sonnet produced </s> on tool-required turns

OpenClaw version

2026.4.22

Operating system

macOS 26.4.1

Install method

No response

Model

macOS 15.4multiple: openai-codex/gpt-5.4, xai/grok-4-1-fast, anthropic/claude-sonnet-4-6

Provider / routing chain

local source checkout with pnpm build, launched via OpenClaw gateway/mac app workflowopenclaw -> pi embedded runner -> openai-codex-responses / openai-responses / anthropic-messages

Additional provider/model setup details

Affected: all configured local GPT, Grok, and Sonnet paths using Pi embedded sessions Severity: high Frequency: always observed after updating to 2026.4.22 Consequence: tool-required turns fail, so normal agent operation is broken across those pathsRegression report.

Last known good behavior was before 2026.4.22. First known bad behavior was immediately after updating to 2026.4.22 on April 22, 2026.

Observed prior forwarding behavior in the relevant area used: tools: toSessionToolAllowlist(allowedToolNames)

Observed 2026.4.22 behavior passed: tools: builtInTools where builtInTools was [].Observed across the configured GPT, Grok, and Sonnet paths after updating on April 22, 2026.

Relevant call sites:

  • src/agents/pi-embedded-runner/run/attempt.ts
  • src/agents/pi-embedded-runner/compact.ts

Suspect regression commit:

  • d7ea136384

Last known relevant fix that preserved custom tool execution:

  • bee2e0f38f

Logs, screenshots, and evidence

Observed code-level change:

`d7ea136384` changed Pi embedded session creation to pass:


tools: builtInTools
customTools: allCustomTools


At these call sites, `builtInTools` is `[]`.

Pi treats `tools` as a tool-name allowlist, so `tools: []` silently strips `customTools`.

Relevant call sites:
- `src/agents/pi-embedded-runner/run/attempt.ts`
- `src/agents/pi-embedded-runner/compact.ts`

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

Reverting the change in d7ea136384 or modifying the tools parameter to include custom tools may resolve the issue with usable tool calling disappearing after updating to OpenClaw 2026.4.22.

Guidance

  • Review the changes introduced in commit d7ea136384 and assess the impact of passing tools: builtInTools (where builtInTools is an empty array) on custom tool execution.
  • Investigate modifying the tools parameter to include custom tools, potentially by reverting to the previous behavior of using toSessionToolAllowlist(allowedToolNames).
  • Examine the src/agents/pi-embedded-runner/run/attempt.ts and src/agents/pi-embedded-runner/compact.ts files to understand how the tools parameter is handled and how it affects custom tool execution.
  • Consider applying the last known relevant fix bee2e0f38f to preserve custom tool execution.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The issue seems to be related to a regression introduced in commit d7ea136384, and reverting this change or modifying the tools parameter may resolve the issue. However, further investigation is needed to confirm the root cause and determine the best course of action.

Recommendation

Apply a workaround by modifying the tools parameter to include custom tools, as the issue is likely caused by the change in d7ea136384 that silently strips custom tools when tools is an empty array.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Observed before 2026.4.22: the same tool-required turns emitted structured toolCall/toolResult records and local/custom tools remained usable.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: 2026.4.22 passes tools: [] to Pi embedded sessions and disables customTools [2 comments, 3 participants]