Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

kaghatim
Copy link
Contributor

@kaghatim kaghatim commented Aug 21, 2025

Description

The AgentCoreBrowser.__init__() method accepts an identifier parameter but never assigns it to self.identifier, causing an AttributeError when create_browser_session() tries to access it.

This PR adds the missing assignment self.identifier = identifier in the constructor and updates the docstring to properly document the identifier parameter.

Related Issues

Fixes #222

Documentation PR

N/A - This is a bug fix that doesn't require documentation changes

Type of Change

Bug fix

Testing

How have you tested the change?

  • Created and ran comprehensive test script that verifies:
    • Default identifier assignment works correctly
    • Custom identifier assignment works correctly
    • All constructor parameters work together properly
    • The identifier attribute is accessible in class methods
    • Documentation is complete and accurate
  • Verified that the fix resolves the AttributeError without breaking existing functionality
  • Confirmed backward compatibility is maintained

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.

- Add missing self.identifier = identifier assignment in constructor
- Update docstring to document identifier parameter
- Add comprehensive test coverage for identifier parameter
- Fixes AttributeError when create_browser_session() accesses self.identifier

Fixes strands-agents#222
@kaghatim kaghatim requested a review from a team as a code owner August 21, 2025 19:29
@kaghatim kaghatim temporarily deployed to manual-approval August 21, 2025 19:29 — with GitHub Actions Inactive
@kaghatim
Copy link
Contributor Author

i see that this fix has been applied in this PR: 219. Happy to close this out in the favor of the other one.

@jer96 jer96 merged commit c33f301 into strands-agents:main Aug 21, 2025
16 checks passed
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.

[BUG] Missing identifier assignment in AgentCoreBrowser
2 participants