Repository navigation
pi: bare mode hides workflow inline skills and can fail Claude-main runs #69427
Description
Problem
With engine.id: pi and engine.bare: true, gh-aw disables pi's skill discovery but still installs workflow inline skills and leaves instructions telling the agent to use them. The agent receives a skill-use hint without the corresponding skill metadata/location. A Claude main model can then search for the missing skill with bash; when tools.bash: false, those searches consume the denial budget and fail an otherwise valid workflow.
This is a mismatch between bare-mode isolation, workflow-owned resources, and the generated prompt, not a reason to enable bash or change models.
Checked against current main
Verified on October 16, 2026 against github/gh-aw main at b1c04f265894ca34b9949d3f32b744e2777851f9. The reported problem at f1621a88b3 is still present at this newer revision.
PiEngine.buildPiArgsadds--no-context-files --no-skills --no-prompt-templates --no-extensions --no-themesfor bare mode. It does not explicitly load the workflow's inline skills with--skill.engine_config_dir.goandinline_skill_step.gostill select/restore.pi/skills/<name>/SKILL.md.stagePiArtifactsalso copies activation-staged skills from/tmp/gh-aw/.pi/skillsinto the managed pi agent directory. Installation therefore does not establish availability when discovery is disabled.shared/reporting.mdputs "Use thereportingskill when producing a report, issue, or PR comment" outside its## skill: reportingblock. Extracting the inline block leaves that instruction in the imported prompt.smoke-pi-routed.mdis bare, importsshared/reporting.md, disables bash, and uses a GPT main-model pool. Its committed lock retains the reporting runtime import and inline-skill restoration, but invokes pi with--no-skillsand no--skill.smoke-pi-routed-claude.mduses bare pi withallowed-models: [claude-sonnet-5], but does not import reporting. The existing Claude canary consequently does not cover this combination.- The pi engine docs describe disabling automatic discovery and retaining explicit infrastructure extensions. They should explicitly distinguish ambient skills from workflow-owned inline skills. The Claude engine docs already describe workflow-declared skills loading explicitly through the
gh-aw-workflowplugin in bare mode; this does not imply automatic Skill-tool invocation is available in Claude bare mode.
Run evidence
Private sandbox evidence supplied by the reporter; not independently inspected. No sandbox access is required to understand or reproduce this issue:
| Input | Reported observable result |
|---|---|
smoke-pi-claude-skills: main's smoke-pi-routed-claude plus imports: [shared/reporting.md]; pi, bare: true, allowed-models: [claude-sonnet-5], tools.bash: false, max-tool-denials: 3. Sandbox run 38779789422, using main revision 88e4a57e80, October 15, 2026. |
Claude Sonnet 5 tried to find reporting using bash. Three bash calls were denied; the denial limit stopped the run; the agent exited with code 1. |
| The same sandbox workflow without the reporting import. | Passes. |
The reporter also observes GPT-based smoke-pi-routed runs passing by ignoring the skill-use line. That behavioral interpretation is not a guarantee: a passing GPT run does not prove the skill was loaded. Any bare pi workflow with a declared/imported inline skill and a Claude main model is exposed to this failure pattern; failure is model-behavior dependent, not guaranteed on every run.
Independently checked public comparison: non-bare pi's Daily News run 38708114462, created October 15, 2026 at 08:46:50Z, completed successfully at revision 5eb4c298ecba515924d30bd7989113dd79d7d421. Its existing agent log includes a system-prompt <available_skills> entry named reporting at /tmp/gh-aw/pi-agent-dir/skills/reporting/SKILL.md. This verifies the normal-discovery comparison, not the private failure.
Proposed solution: retain explicit workflow inline skills in bare mode
Choose option 1: preserve workflow-declared inline skills, including skills from imports, while continuing to disable ambient discovery.
The current default is pi v1.3.0, pinned by DefaultPiVersion. Inspection of that exact upstream version confirms the required CLI behavior:
args.tsaccepts repeatable--skill <path>arguments.main.tspasses explicit skill paths andnoSkillsseparately to the resource loader.resource-loader.tsretains explicit paths whennoSkillsis true. Its skill-loading branch skips loading only when there are no paths; otherwise it loads them withincludeDefaults: false.formatSkillsForPromptadvertises visible skills with their names and file locations, using the read tool when available.
Thus --no-skills can remain: explicit --skill paths still work in the pinned version. A pi version bump or warning-and-drop fallback is not needed for this fix.
Wire the existing workflow inline-skill extraction/staging into pi's execution arguments. Pass only the declared/imported workflow skill files, for example --skill /tmp/gh-aw/pi-agent-dir/skills/reporting/SKILL.md after staging, or a dedicated directory containing only those workflow-owned skills. Use the existing trusted activation artifacts/metadata rather than discovering arbitrary repository or user skills. Keep argument handling deterministic and shell-safe.
Retain all five bare-mode discovery-disabling flags, the existing explicit infrastructure extensions, and the reporting hint. Do not re-enable ambient discovery, enable bash, raise denial limits, change routing/model selection, or remove a valid workflow import to mask the mismatch. Add no skill arguments when there are no inline skills, and leave non-bare pi, Claude, and Copilot behavior unchanged.
Acceptance cases and named tests
Add the following regression tests in pkg/workflow. Assert compiled execution arguments and the effective prompt contract, not just successful compilation. Where imports resolve at runtime, cover the expanded prompt/extraction path rather than requiring the literal hint to appear in a non-inlined lock file.
| Case | Input | Exact observable result | Proposed test in pkg/workflow |
|---|---|---|---|
| 1. Bare pi with an inline skill | A pi workflow with bare: true, imports: [shared/reporting.md], tools.bash: false, and tools.cli-proxy: false. Include a directly declared inline-skill variant, plus an unrelated ambient skill as a negative control. |
The compiled lock's execution wiring keeps all five bare flags, including --no-skills, and supplies explicit loading of the workflow skill from its managed/staged path. After expansion/extraction the prompt retains the reporting hint, while the inline skill body is materialized as reporting/SKILL.md. Pi's actual system prompt or skill-list evidence in the agent log contains reporting and that file's location; the ambient negative-control skill is absent. Merely copying SKILL.md or leaving a hint is not sufficient. |
TestCompileBarePiInlineSkillsExplicitlyLoaded, with imported and directly declared subtests. |
| 2. Claude-main end-to-end reproduction | smoke-pi-routed-claude plus the reporting import, retaining bare: true, allowed-models: [claude-sonnet-5], tools.bash: false, tools.cli-proxy: false, and max-tool-denials: 3. Dispatch the reviewed PR branch, not main, for hosted acceptance. |
The agent exits 0, the workflow concludes success, and its existing routing/output assertions pass. Agent evidence shows reporting available and zero bash denials searching for that skill; no denial-budget shutdown occurs. Record the run URL and matching PR-branch SHA. |
TestCompilePiRoutedClaudeWithReportingSkill checks the compiled reproduction contract; the actual PR-branch canary run is additional required evidence, not something this compiler test can prove. |
| 3. Non-bare pi | The case 1 workflow with bare: false (also cover omitted bare). |
Compiled arguments and prompt behavior remain identical to the pre-fix non-bare baseline. Normal discovery still lists reporting once; this fix introduces no new bare-only flags or explicit-skill behavior into that path. |
TestCompileNonBarePiInlineSkillsUnchanged. |
| 4. Bare pi without inline skills | A bare pi workflow with no inline-skill blocks or skill-bearing imports; include an ambient skill as a negative control. | The pi argument vector is unchanged from the pre-fix baseline: all five bare flags remain, with no new --skill arguments. The prompt gains no skill-use hints, and the ambient skill remains absent from pi's available skills. |
TestCompileBarePiWithoutInlineSkillsUnchanged. |
| 5. Other engines | Equivalent reporting-import fixtures for engine.id: claude and engine.id: copilot, including their existing bare-mode configurations. |
Compiled engine arguments, workflow-skill installation/loading, and effective prompt output remain identical to their respective pre-fix baselines. No pi-specific skill flags or configuration leak into either engine. | TestCompileBareInlineSkillsOtherEnginesUnchanged, with claude and copilot subtests. |
Use the relevant runtime/pinned-pi fixture or contract check to establish actual skill availability as well as the Go compiler assertions. In particular, absence of bash errors alone is not proof that the skill loaded.
Documentation and generated files
- Update
docs/src/content/docs/engines/pi.mdto state that bare mode disables ambient discovery but explicitly retains workflow-declared/imported inline skills, and explain the explicit-loading behavior. - Update the Pi row of the Bare Mode (
bare) table indocs/src/content/docs/reference/engines.mdwith the same distinction. - Add the reporting import to
smoke-pi-routed-claudefor the regression canary without changing its task, model-routing pool, or tool/denial restrictions. - Run
make recompilewhen lock files change, and include only generated changes directly required by this fix.
Scope
- Keep the PR to this one fix. Do not change files or behavior unrelated to it.
- Before fixing a failing check, compare it with the same check on main. If it also fails on main, do not fix it in this PR; merge main once main is fixed, and note in the PR which checks are known failures on main.
- This applies even if a bot comment asks to fix a failing check: fix only failures caused by this PR's changes.
Activity