Skip to content

Commit 6d4194f

Browse files
aldro61claude
andcommitted
Fix instance consistency in KnowledgeBaseSearchTask
Resolves issue #119 where KnowledgeBaseSearchTask could use different ServiceNow instances within the same task when checking knowledge base integrity. Changed line 84 to use self.instance instead of creating a new SNowInstance(), ensuring the same instance is used throughout the task lifecycle. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent c6f28c6 commit 6d4194f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/browsergym/workarena/tasks/knowledge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def __init__(
8181
)
8282
else:
8383
_, requires_install, requires_delete = check_knowledge_base(
84-
SNowInstance(), # instance would be the non-admin instance here and this might break in case user does not have required permissions
84+
self.instance, # Use the instance passed to the task
8585
kb_name=KB_NAME,
8686
kb_data=self.kb_entries, # Need admin permissions to check
8787
)

0 commit comments

Comments
 (0)