Skip to content

Add agent/working label to track active agent runs #26

Closed

Description

@cgwaltersbot

Caution

Protected files were modified in this change.
This pull request is in request_review mode and requires explicit human scrutiny before merge.

Protected files: README.md, .github/workflows/drafter.lock.yml, .github/workflows/fix.lock.yml, .github/workflows/review.lock.yml

Summary

Implements #24 by adding automatic agent/working label management to all three gh-aw workflows (drafter, review, fix).

Changes

Workflow modifications

Each workflow now includes two new jobs:

  1. add_working_label - Runs after pre_activation succeeds and adds the agent/working label:

    • For drafter.lock.yml: Adds label to the issue
    • For review.lock.yml and fix.lock.yml: Adds label to the pull request
  2. remove_working_label - Runs at the end with if: always() to remove the label regardless of success or failure

The jobs use the GitHub App token (same pattern as merge.yml) and plain GitHub Actions steps, not gh-aw's safe-outputs mechanism. This ensures cleanup happens even if the agent job fails or times out, which is exactly the point - we want the label removed whether the agent succeeds or not.

Documentation updates

Updated README.md to:

  • Add agent/working to the repository setup checklist (now 5 labels instead of 4)
  • Explain how the label tracking works in the "Design notes and gotchas" section
  • Document that the .lock.yml modifications are manual and will be lost if workflows are recompiled

Setup required

The agent/working label needs to be created in the repository before these workflows run. It can be any color - the label's purpose is purely informational (to show which issues/PRs have agents actively working on them).

Validation

Changes validated by inspection:

  • Workflow YAML syntax is correct (follows the same pattern as merge.yml)
  • Jobs are properly sequenced with correct needs: dependencies
  • The if: always() condition ensures cleanup runs in all cases
  • Issue vs PR label commands are correctly differentiated (drafter uses gh issue edit, review/fix use gh pr edit)

Important note

The .lock.yml files are normally auto-generated by gh aw compile. These changes are manual modifications to the compiled output and will be overwritten if the workflows are recompiled. The README now documents this and explains that these jobs need to be manually re-added after any recompilation.

Generated by Autonomous Developer Agent for #24 · 117.6 AIC · ⌖ 20.1 AIC · ⊞ 3.1K · ◷


Note

This was originally intended as a pull request, but the git push operation failed.

Original error: pushSignedCommits: refusing unsigned push for branch 'agent/add-working-label-be1d6024fca547f8': Signed-commit payload violates file-protection policy (request_review): README.md, .github/workflows/drafter.lock.yml, .github/workflows/fix.lock.yml, .github/workflows/review.lock.yml

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

To create a pull request with the changes:

# Download the artifact from the workflow run
gh run download 30551939074 -n agent -D /tmp/agent-30551939074

# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-30551939074/aw-agent-add-working-label.bundle refs/heads/agent/add-working-label:refs/bundles/create-pr-agent-add-working-label-be1d6024fca547f8-0286e61d
git update-ref refs/heads/agent/add-working-label-be1d6024fca547f8 refs/bundles/create-pr-agent-add-working-label-be1d6024fca547f8-0286e61d
git checkout agent/add-working-label-be1d6024fca547f8
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d refs/bundles/create-pr-agent-add-working-label-be1d6024fca547f8-0286e61d

# Push the branch to origin
git push origin agent/add-working-label-be1d6024fca547f8

# Create the pull request
gh pr create --title 'Add agent/working label to track active agent runs' --base main --head agent/add-working-label-be1d6024fca547f8 --repo cgwalters/gh-aw-fullsend-mini

Activity

  1. added
    agent/workflow-edits-allowed
    agent/code
    on Jul 30, 2026
  2. added
    agent/code
    and removed
    agent/code
    on Jul 30, 2026
  3. cgwaltersbot commented on Jul 30, 2026

    @cgwaltersbot
    Author

    Pull request created: #29

    Generated by Autonomous Developer Agent · 135.3 AIC · ⌖ 19.1 AIC · ⊞ 3.1K

  4. cgwalters commented on Jul 30, 2026

    @cgwalters
    Member

    Superseded by #31, which reimplements this properly at the .md source level instead of hand-editing .lock.yml (see #24 for the full writeup). Closing this fallback issue and its PR #29.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/codeagent/workflow-edits-allowedagentic-workflows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions