Skip to content

Upload activation artifact step missing include-hidden-files: true — silently drops .claude/.github from activation snapshot #29499

@bartul

Description

@bartul

Problem

addActivationArtifactUploadStep in pkg/workflow/compiler_activation_job_builder.go emits the actions/upload-artifact step without include-hidden-files: true.

actions/upload-artifact@v4 introduced a breaking change: any path component starting with . is silently excluded from the archive by default (changelog). Because the activation sparse checkout saves .github/, .claude/, and .agents/ into /tmp/gh-aw/base/, all three are dropped from the artifact.

The agent job's restore_base_github_folders.sh then sees those directories missing from the snapshot and deletes them from the PR workspace as "not present in base branch". This wipes agent config files (e.g. SKILL.md under .claude/) for every PR-triggered run. workflow_dispatch runs are unaffected because they skip the restore step.

Impact

For agentic workflows triggered by pull_request events that rely on content under dot-prefixed directories (skills, agent definitions, prompts imported from .claude/ or .github/agents/), the agent runs with those directories stripped from its workspace. Symptoms are hard to spot because the run completes "successfully" — the agent just silently falls back to generic behavior.

In particular, this breaks the intended reuse pattern where a single canonical skill under .claude/skills/<skill>/SKILL.md is authored once and imported into one or more agent profiles (.github/agents/*.agent.md) via {{#import ../../.claude/skills/<skill>/SKILL.md#<section>}}. The imported content is resolved at runtime via the agent's Read tool, so when .claude/ is stripped from the workspace the imports become dead text and the agent silently falls back to generic behavior. This effectively prevents sharing skill content between interactive Claude Code sessions (which use .claude/skills/) and gh-aw agent profiles on PR-triggered runs.

Reproduction

  1. Author a gh-aw workflow whose prompt imports a file under .claude/, e.g.
    {{#import ../../.claude/skills/my-skill/SKILL.md}}.
  2. Trigger it via a pull_request event (not workflow_dispatch).
  3. Observe agent log lines:
    • Restore agent config folders from base branchRemoved PR-injected .claude (not present in base branch)
    • First Read SKILL.mdPath does not exist.

Fix

Add one line after the name: field in addActivationArtifactUploadStep (around L447):

ctx.steps = append(ctx.steps, "          include-hidden-files: true\n")

Position it immediately after with: / name: and before path:.

Verification

After applying the fix (or the equivalent manual patch in a compiled lock file) and recompiling, a PR-triggered run logs:

  • Activation job Upload activation artifact step: include-hidden-files: true present in the with: block.
  • Agent job Restore agent config folders from base branch step: Restored .claude from base branch snapshot (not the "removed" variant).
  • Agent's Read of files under .claude/ returns content.

Verified with a local manual patch against gh-aw v0.71.1 using actions/upload-artifact@v7.0.1, confirmed on a PR-triggered agentic run.

Happy to open a PR with the one-line fix if helpful.

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