Skip to content

safe-outputs prompt says "exactly one" even when config allows multiple calls #22364

Description

@samuelkahessay

Bug

The shared prompt in actions/setup/md/safe_outputs_prompt.md says:

**CRITICAL: You MUST call exactly one safe-output tool before finishing.**

But workflow config can allow many calls:

safe-outputs:
  create-issue:
    max: 20
  add-comment:
    max: 5
  dispatch-workflow:
    max: 1

These are mutually inconsistent. The prompt advertises a smaller action space than the config permits, routing valid multi-write sequences into missing_tool / noop behavior.

This affects any engine consuming the shared prompt, not just Codex.

Reproduction

  1. Configure a workflow with multiple safe-output types and max > 1
  2. Compile with gh aw compile
  3. Inspect the generated prompt for the shared safe-outputs instructions
  4. Observe the prompt still says "exactly one" regardless of config

Observed symptom

E2E run evidence (ephemeral repo, no longer accessible)

In one E2E run, the agent produced a complete 5-issue decomposition, then emitted a single missing_tool safe-output instead of using the available tools:

Reason: This workflow run enforces exactly one safe-output tool call, which prevents
performing the required multi-step GitHub write sequence (create multiple issues, add
summary comment, and dispatch workflow).

The safe-outputs handler processed 1 message: missing_tool, 0 create_issue calls.

Historical run: samuelkahessay/my-project-e2e-fp-9ecc4b52 / Actions run 23418372218

Expected behavior

The shared prompt should communicate:

  • the agent must call at least one safe-output tool before finishing
  • each tool is subject to its own configured per-tool limits
  • multiple safe-output calls may be valid across one or more tool types
  • noop is the fallback only when no permitted write action is needed

Suggested fix

Update the shared prompt to say "at least one" instead of "exactly one."

Better: compile the prompt from config so it states the real action budget for the current workflow. If gh-aw intentionally wants a single-call mode in some workflows, emit that instruction only when the compiled workflow actually enforces it.

Environment

  • gh-aw version: 0.62.5
  • Engine: codex (gpt-5-codex)
  • Compiled with gh aw compile

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions