Skip to content

[SYNC: FVH → laurigates] reusable-claude: jq failure-type detection + structured_output fallback (manual review) #24

Description

@laurigates

Backport (manual review): reusable-claude — jq failure-type detection + structured_output fallback

Source: ForumViriumHelsinki/.githubreusable-claude.yml

Why

FVH replaced the naive grep -q error_max_turns two-way branch with a jq parse of the execution file (subtype / num_turns / errors), handles error_during_execution and error_max_budget_usd, and falls back to the action's structured_output when the exec file was never written (SDK crash). Richer continuation comments (turn counts, session id, per-type guidance).

⚠️ Operating boundary — not a clean cherry-pick

The two files have structurally diverged: laurigates uses a plugins / plugin_marketplaces / additional_permissions input model; FVH replaced those with an allowed_tools model whose default is FVH-stack-specific (mcp__github__*, uv/pytest/bun/biome…). The error-handling step is worth having, but it can't be lifted without reconciling the input schema. Flagged for manual review rather than an automated backport.

Verification

Confidence: low (entangled). Recommend porting just the "Detect failure type" + continuation-comment steps by hand, keeping laurigates' input schema.


Part of a feature-parity backport sweep between ForumViriumHelsinki/.github and laurigates/.github. Sanitization verified before any PR is opened; logic is org-agnostic.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvementgithub-actionsPull requests that update GitHub Actions code

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions