Skip to content

fix(loop): prevent runtime event NPEs for null tool metadata#158

Merged
alexk-dev merged 2 commits intomainfrom
fix/runtime-event-null-tool-metadata
Mar 9, 2026
Merged

fix(loop): prevent runtime event NPEs for null tool metadata#158
alexk-dev merged 2 commits intomainfrom
fix/runtime-event-null-tool-metadata

Conversation

@alexk-dev
Copy link
Owner

Summary

  • replace Map.of(...) runtime event payload construction in DefaultToolLoopSystem with a null-safe builder so incomplete tool call metadata does not abort the turn before the tool executes
  • cover the shared failure mode with regression tests for missing toolCallId/tool fields and for stopOnToolFailure when the outcome has no toolName
  • keep the runtime event contract stable while allowing nullable tool metadata to pass through the event service instead of crashing the tool loop

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

@alexk-dev alexk-dev merged commit 56b5f1c into main Mar 9, 2026
17 checks passed
@alexk-dev alexk-dev deleted the fix/runtime-event-null-tool-metadata branch March 9, 2026 22:32
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.

1 participant