Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

Fix Campaign Safe Output Error: Create Agent Session Handler ✅

Problem

The security-alert-burndown workflow 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_task to create_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_TYPES in safe_output_handler_manager.cjs
  • generateFilteredToolsJSON() in safe_outputs_config_generation.go
  • Multiple validation and enhancement files

This prevented the create_agent_session tool from being exposed to the agent's MCP server.

Solution

Renamed all references from create_agent_task to create_agent_session:

  • JavaScript: safe_output_handler_manager.cjs
  • JavaScript tests: safe_output_handler_manager.test.cjs (7 occurrences)
  • Go: safe_outputs_config_generation.go (3 occurrences)
  • Go: notify_comment.go
  • Go: safe_output_validation_config.go
  • Go: safe_output_validation_config_test.go
  • Go: tool_description_enhancer.go

Validation

All checks passed:

  • ✅ Code formatting with make fmt - passed
  • ✅ Binary builds successfully
  • ✅ All unit tests pass
  • ✅ All 141 workflow files recompile successfully
  • ✅ Linting passes (make lint)
  • ✅ No remaining references to create_agent_task in code
  • ✅ Compiled workflow contains correct create_agent_session tool definition

Impact

With this fix, workflows configured with create-agent-session in 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

Fix campaign safe output error: Cannot create agent sessions for Dependabot PR bundling. No create_agent_session tool is available in safe-outputs.
See run: http://github.com/githubnext/gh-aw/actions/runs/21451402591/job/61781318846


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 28, 2026 19:15
- Update JavaScript handler manager and tests
- Update Go safe outputs config generation
- Update Go validation config and tests
- Update Go tool description enhancer
- Update Go notify comment

This fixes the issue where create_agent_session tool was defined but not
properly exposed to the agent because the code referenced the old
create_agent_task name.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer mnkiefer marked this pull request as ready for review January 28, 2026 19:19
@mnkiefer mnkiefer changed the title [WIP] Fix campaign safe output error for agent sessions refactor: rename all create_agent_task to create_agent_session Jan 28, 2026
@mnkiefer mnkiefer merged commit be1b774 into main Jan 28, 2026
124 checks passed
@mnkiefer mnkiefer deleted the copilot/fix-campaign-safe-output-error branch January 28, 2026 19:24
Copilot AI requested a review from mnkiefer January 28, 2026 19:24
Copilot stopped work on behalf of mnkiefer due to an error January 28, 2026 19:24
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.

2 participants