Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions agent/context_references.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,14 @@ async def preprocess_context_references_async(
allowed_root=allowed_root_path,
)
for ref in refs
)
),
return_exceptions=True,
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_expand_reference() already catches all Exception subclasses for its implemented branches (agent/context_references.py:225-243), so this primarily changes handling for cancellation/control-flow exceptions. Please add a reproducer for an exception that can escape on current main, or preserve and test cancellation propagation explicitly.

for warning, block in expanded:
for item in expanded:
if isinstance(item, BaseException):
warnings.append(f"reference expansion failed: {item}")
continue
warning, block = item
if warning:
warnings.append(warning)
if block:
Expand Down
Loading