[google/syzkaller] 1c2ff3: pkg/aflow: fix panic when tool names are used in a...

1 view
Skip to first unread message

Aleksandr Nogikh

unread,
May 7, 2026, 6:23:13 AMMay 7
to syzk...@googlegroups.com
Branch: refs/heads/gh-readonly-queue/master/pr-7200-55d5486e60dc291e1198da1b80992fa7ea09d02d
Home: https://github.com/google/syzkaller
Commit: 1c2ff3f985f46c14d19fdadaf02516787d3f5449
https://github.com/google/syzkaller/commit/1c2ff3f985f46c14d19fdadaf02516787d3f5449
Author: Aleksandr Nogikh <nog...@google.com>
Date: 2026-05-07 (Thu, 07 May 2026)

Changed paths:
M pkg/aflow/llm_agent.go
M pkg/aflow/llm_agent_test.go
A pkg/aflow/testdata/TestToolInPrompt.llm.json
A pkg/aflow/testdata/TestToolInPrompt.trajectory.json

Log Message:
-----------
pkg/aflow: fix panic when tool names are used in agent prompts

LLMAgent uses two templates: Instruction and Prompt. Previously, tool names
(e.g. {{.toolCodeeditor}}) were only injected into the state map during the
Instruction formatting phase. If a Prompt template also referenced a tool,
it would trigger a "missing key" panic during execution.

This change moves the formatting of both templates into a single config()
method, ensuring they both use the same augmented state map containing
all available tools.

A regression test is added to verify tool name resolution in Prompts.



To unsubscribe from these emails, change your notification settings at https://github.com/google/syzkaller/settings/notifications

Aleksandr Nogikh

unread,
May 7, 2026, 6:35:24 AMMay 7
to syzk...@googlegroups.com
Branch: refs/heads/master
Reply all
Reply to author
Forward
0 new messages