-
Notifications
You must be signed in to change notification settings - Fork 46
Remove unused enabledTools variable from safe outputs prompt generation #13001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+69
−12
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
…oolNames purpose - Remove unused enabledTools variable from unified_prompt_step.go that was retrieved but never used - Update GetEnabledSafeOutputToolNames() comment to explicitly state tool names should NOT be in prompts - Add test to ensure tool names never appear in safe outputs prompt (regression prevention) - The prompt correctly instructs agents to "Discover available tools from the safeoutputs MCP server" This fix prevents confusion and ensures the bug where tool names in prompts cause agents to fail doesn't regress. Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix tool names in the safe outputs prompt
Remove unused enabledTools variable from safe outputs prompt generation
Jan 31, 2026
pelikhan
approved these changes
Jan 31, 2026
Contributor
|
@copilot merge main and recompile |
Resolved conflicts by accepting main branch changes for: - .github/workflows/functional-pragmatist.md (removed cache tool) - .github/workflows/functional-pragmatist.lock.yml - docs/src/content/docs/agent-factory-status.mdx
- Merged main branch (commits up to 3d561d8) - Resolved conflicts in functional-pragmatist files by accepting main branch changes - Rebuilt binary and recompiled all 147 workflows successfully - All workflows compile without errors Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
This was referenced Feb 1, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix: Prevent Tool Names in Safe Outputs Prompt ✅
Issue: #12437 - Tool names in safe outputs prompt cause agent failures
🎯 Solution Summary
Removed unused
enabledToolsvariable that was a remnant of old buggy code. The code now cleanly generates a prompt that instructs agents to query the MCP server for available tools, instead of listing them directly.📝 Changes Made
pkg/workflow/unified_prompt_step.goenabledTools := GetEnabledSafeOutputToolNames(data.SafeOutputs)if len(enabledTools) > 0checkpkg/workflow/safe_outputs_config_helpers.gopkg/workflow/prompts_test.goTestSafeOutputsPrompt_NeverListsToolNames()regression testMerged main branch (as requested)
✅ Test Results
📊 Impact
🎨 Generated Prompt (Verified)
No tool names listed ✅ (e.g., no "create_issue", "add_comment", etc.)
🔐 Security Impact
Prevents agents from attempting premature tool access before MCP initialization completes, which causes failures and potential security issues.
Ready for merge ✅
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.