Skip to content

fix: add BYPASS_TOOL_CONSENT to PROTECTED_VARS#406

Merged
lizradway merged 1 commit intostrands-agents:mainfrom
lizradway:tool_consent
Mar 2, 2026
Merged

fix: add BYPASS_TOOL_CONSENT to PROTECTED_VARS#406
lizradway merged 1 commit intostrands-agents:mainfrom
lizradway:tool_consent

Conversation

@lizradway
Copy link
Member

Description

BYPASS_TOOL_CONSENT globally disables user consent prompts across the framework but wasn't in the environment tool's PROTECTED_VARS blocklist. This allowed an agent to set it via the environment tool with a single user approval, silently disabling all consent gates — including the environment tool's own. This fix adds it to PROTECTED_VARS so it can't be modified at runtime.

Related Issues

n/a

Documentation PR

n/a

Type of Change

Bug fix

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@JackYPCOnline
Copy link
Contributor

Let's double check why github tests failed

@lizradway lizradway enabled auto-merge (squash) February 26, 2026 20:15
@lizradway lizradway self-assigned this Mar 2, 2026
@lizradway lizradway deployed to auto-approve March 2, 2026 17:37 — with GitHub Actions Active
@lizradway lizradway disabled auto-merge March 2, 2026 17:37
@lizradway lizradway merged commit bcded3e into strands-agents:main Mar 2, 2026
20 of 34 checks passed
@lizradway lizradway deleted the tool_consent branch March 2, 2026 17:43
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.

4 participants