fix(tools): forward senderIsOwner to embedded runner so owner-only tools work#22296
Merged
obviyus merged 3 commits intoopenclaw:mainfrom Feb 21, 2026
Merged
fix(tools): forward senderIsOwner to embedded runner so owner-only tools work#22296obviyus merged 3 commits intoopenclaw:mainfrom
obviyus merged 3 commits intoopenclaw:mainfrom
Conversation
Contributor
|
Is this a recent regression? If so, put "regression" into your title. This makes it more visible as stuff that just broke is more important than things that never worked. |
29c23f7 to
68f97ec
Compare
…ols work senderIsOwner was correctly computed by resolveCommandAuthorization() and stored in followupRun.run, but buildEmbeddedRunBaseParams() and the followup runner omitted it when forwarding parameters to runEmbeddedPiAgent(). This caused senderIsOwner to arrive as undefined, which applyOwnerOnlyToolPolicy() treated as false, stripping owner-only tools (cron, gateway) from every agent run. Fixes openclaw#22295 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
68f97ec to
0baca5c
Compare
Contributor
mmyyfirstb
pushed a commit
to mmyyfirstb/openclaw
that referenced
this pull request
Feb 21, 2026
…ols work (openclaw#22296) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 0baca5c Co-authored-by: hcoj <1169805+hcoj@users.noreply.github.com> Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com> Reviewed-by: @obviyus
mreedr
pushed a commit
to mreedr/openclaw-custom
that referenced
this pull request
Feb 24, 2026
…ols work (openclaw#22296) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 0baca5c Co-authored-by: hcoj <1169805+hcoj@users.noreply.github.com> Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com> Reviewed-by: @obviyus
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…ols work (openclaw#22296) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 0baca5c Co-authored-by: hcoj <1169805+hcoj@users.noreply.github.com> Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com> Reviewed-by: @obviyus
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
…ols work (openclaw#22296) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 0baca5c Co-authored-by: hcoj <1169805+hcoj@users.noreply.github.com> Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com> Reviewed-by: @obviyus
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
…ols work (openclaw#22296) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 0baca5c Co-authored-by: hcoj <1169805+hcoj@users.noreply.github.com> Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com> Reviewed-by: @obviyus
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
…ols work (openclaw#22296) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 0baca5c Co-authored-by: hcoj <1169805+hcoj@users.noreply.github.com> Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com> Reviewed-by: @obviyus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
senderIsOwnerwas dropped when forwarding parameters torunEmbeddedPiAgent, causing owner-only tools (cron,gateway) to be stripped from every agent runDetails
resolveCommandAuthorization()correctly determinessenderIsOwnerandget-reply-run.tsstores it infollowupRun.run. However, the helper functions that construct parameters forrunEmbeddedPiAgentomitted it:agent-runner-utils.ts:buildEmbeddedRunBaseParams()— did not includesenderIsOwnerfollowup-runner.ts— same omission in the directrunEmbeddedPiAgentcallqueue/types.ts:FollowupRun["run"]— type was missingsenderIsOwnerBecause
senderIsOwnerarrived asundefined, the guardoptions?.senderIsOwner === trueinpi-tools.tsevaluated tofalse, andapplyOwnerOnlyToolPolicystripped all owner-only tools.Fixes #22295
Test plan
commands.ownerAllowFromsenderIsOwner🤖 Generated with Claude Code
Greptile Summary
Adds the missing
senderIsOwnerproperty forwarding in three locations where parameters are constructed forrunEmbeddedPiAgent, fixing a bug where owner-only tools (cron,gateway) were incorrectly stripped from all embedded agent runs.Changes made:
agent-runner-utils.ts:buildEmbeddedRunBaseParams()— now forwardssenderIsOwnerfromparams.runfollowup-runner.ts— now includessenderIsOwnerwhen callingrunEmbeddedPiAgentfor queued runsqueue/types.ts:FollowupRun["run"]— addedsenderIsOwner?: booleanto the type definitionThe fix ensures that authorization context determined by
resolveCommandAuthorization()is properly propagated through the entire embedded agent execution pipeline, soapplyOwnerOnlyToolPolicyinpi-tools.tscorrectly evaluatesoptions?.senderIsOwner === true.Confidence Score: 5/5
senderIsOwner) in parallel code paths, with consistent typing. The fix aligns with the existing authorization infrastructure and doesn't introduce new logic or side effects.Last reviewed commit: 29c23f7
(2/5) Greptile learns from your feedback when you react with thumbs up/down!