Skip to content

fix(core): sanitize optional tool metadata on permission requests - #40052

Closed
anujbolewar wants to merge 1 commit into
anomalyco:devfrom
anujbolewar:fix-permission-metadata-undefined
Closed

anujbolewar wants to merge 1 commit into
anomalyco:devfrom
anujbolewar:fix-permission-metadata-undefined

Conversation

@anujbolewar

Copy link
Copy Markdown

Omit undefined keys in glob/grep tool metadata construction and recursively sanitize metadata in permission request creation to prevent JSON schema encoding failures.

Omit undefined keys in glob/grep tool metadata construction and recursively sanitize metadata in permission request creation to prevent JSON schema encoding failures.

Fixes anomalyco#37650
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found several related PRs addressing similar issues with undefined metadata in permission requests:

Potential Duplicates:

  1. PR fix(core): omit undefined optional keys from glob/grep permission metadata #37965 - fix(core): omit undefined optional keys from glob/grep permission metadata

  2. PR fix(core): drop undefined metadata values from permission requests #37679 - fix(core): drop undefined metadata values from permission requests

  3. PR fix(opencode): drop undefined from v1 permission metadata #38918 - fix(opencode): drop undefined from v1 permission metadata

All three PRs appear to be addressing the same root cause (undefined values in tool metadata causing JSON schema encoding failures). You should verify whether PR #40052 is a new attempt to address these issues or if it duplicates work already completed in one of these earlier PRs.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 1, 2026
@github-actions github-actions Bot closed this Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tools: optional search metadata breaks pending permission listing

1 participant