Skip to content

Add temporary project ID support for safe outputs#11174

Merged
mnkiefer merged 4 commits intomainfrom
copilot/analyze-campaign-generation-issues
Jan 22, 2026
Merged

Add temporary project ID support for safe outputs#11174
mnkiefer merged 4 commits intomainfrom
copilot/analyze-campaign-generation-issues

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Safe outputs execute async in a separate job, so agents calling create_project never receive the project URL needed for subsequent update_project calls. This broke campaign generation workflows where field creation requires the project URL.

Changes

MCP server handler (safe_outputs_handlers.cjs)

  • New createProjectHandler auto-generates temporary ID if not provided
  • Returns {result: "success", temporary_id: "aw_...", project: "#aw_..."} to agent

Tool schemas (safe_outputs_tools.json)

  • Added optional temporary_id field to create_project
  • Updated update_project.project pattern to accept temporary IDs: ^(https://github\.com/...|\#?aw_[0-9a-f]{12})$

Project handler manager (safe_output_project_handler_manager.cjs)

  • Builds temporary ID → URL map as messages process
  • Stores mapping after successful create_project: map.set(temp_id, projectUrl)
  • Passes map to subsequent handlers

update_project handler (update_project.cjs)

  • Resolves temporary IDs to actual URLs before processing
  • Supports both #aw_abc123def456 and aw_abc123def456 formats

Usage

// Agent workflow (automatic)
create_project({title: "Campaign"})
// Returns: {result: "success", temporary_id: "aw_abc123def456", project: "#aw_abc123def456"}

update_project({
  project: "#aw_abc123def456",  // Resolved during safe_outputs job
  operation: "create_fields"
})

Pattern matches existing issue temporary ID system (temporary_id.cjs).

Original prompt

Analyze campaign generation run: https://github.com/githubnext/gh-aw/actions/runs/21235852123
Understand and fix why:

  • Update project did not take place (to add fields like new status item, worker workflows, etc.)
  • Update issue did not work (no updates to the issue body)

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 22, 2026 04:32
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer mnkiefer marked this pull request as ready for review January 22, 2026 04:48
Copilot AI changed the title [WIP] Fix issues with campaign generation updates Add temporary project ID support for safe outputs Jan 22, 2026
Copilot AI requested a review from mnkiefer January 22, 2026 04:48
@mnkiefer
Copy link
Contributor

@copilot This should not affect other update-project safe output calls outside of the campaign context.

@mnkiefer mnkiefer merged commit f7cc7b3 into main Jan 22, 2026
83 of 84 checks passed
@mnkiefer mnkiefer deleted the copilot/analyze-campaign-generation-issues branch January 22, 2026 05:02
Copilot stopped work on behalf of mnkiefer due to an error January 22, 2026 05:03
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