refactor: rename all create_agent_task to create_agent_session #12338
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 Campaign Safe Output Error: Create Agent Session Handler ✅
Problem
The
security-alert-burndownworkflow failed with error: "Cannot create agent sessions for Dependabot PR bundling. No create_agent_session tool is available in safe-outputs."Root Cause
The codebase had an incomplete rename from
create_agent_tasktocreate_agent_session. While the tool definition and implementation files used the new name, several critical parts of the code still referenced the old name:STANDALONE_STEP_TYPESinsafe_output_handler_manager.cjsgenerateFilteredToolsJSON()insafe_outputs_config_generation.goThis prevented the
create_agent_sessiontool from being exposed to the agent's MCP server.Solution
✅ Renamed all references from
create_agent_tasktocreate_agent_session:safe_output_handler_manager.cjssafe_output_handler_manager.test.cjs(7 occurrences)safe_outputs_config_generation.go(3 occurrences)notify_comment.gosafe_output_validation_config.gosafe_output_validation_config_test.gotool_description_enhancer.goValidation
✅ All checks passed:
make fmt- passedmake lint)create_agent_taskin codecreate_agent_sessiontool definitionImpact
With this fix, workflows configured with
create-agent-sessionin safe-outputs will now properly expose the tool to agents via the MCP server, enabling agents to create agent sessions as intended. This resolves the security-alert-burndown workflow failure and allows for Dependabot PR bundling automation.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.