Skip to content

Support temporary ID resolution for update_issue and add_comment targeting #25768

@devantler

Description

@devantler

Problem

When an agent creates an issue via create_issue and receives a temporary ID (aw_xxx), it cannot use that ID to call update_issue or add_comment targeting the newly created issue in the same run. The safe-outputs docs state:

When using target: "*", the agent must provide issue_number or item_number in the output to identify which issue to update.

This requires an integer (real issue number), but the issue has not been created yet when the agent is composing output, so only the temporary ID is available.

Current Workaround

Workflow prompts include explicit instructions telling agents to front-load all content into the initial create_issue body, since they cannot update a newly created issue in the same run:

**`update_issue` requires a real `issue_number`**: The `update_issue` safe output does NOT
resolve temporary IDs (`aw_xxx`). Always use the actual GitHub issue number (integer) when
calling `update_issue`. If you have only a `temporary_id` from `create_issue`, include all
intended content in the original `create_issue` body instead of planning a same-run follow-up
via `update_issue` or `add_comment`.

This forces unnatural prompt patterns where agents must anticipate all content upfront, preventing iterative workflows (create issue, gather more data, update issue).

Expected Behavior

The safe-output pipeline should resolve temporary IDs in targeting fields (issue_number, item_number) for update_issue, add_comment, add_labels, close_issue, and similar tools, the same way temporary IDs are already resolved in text cross-references, labels, and sub-issue linking.

This would enable natural agent workflows like:

[
  {"type": "create_issue", "temporary_id": "aw_analysis", "title": "Analysis Report", "body": "Initial findings..."},
  {"type": "update_issue", "issue_number": "aw_analysis", "operation": "append", "body": "Additional findings after deeper analysis..."},
  {"type": "add_comment", "issue_number": "aw_analysis", "body": "Follow-up: related issue found at #456"}
]

Context

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions