Require BLOCKED + DIAGNOSE when LLM cannot perform required workflow step #552

Closed
opened 2026-07-08 14:28:25 -05:00 by jcwalker3 · 3 comments
Owner

Problem

LLM workflow sessions sometimes continue after a required workflow step fails or is unavailable. Examples include missing skills, broken terminal execution, MCP capability deadlocks, wrong profile/session state, missing tool access, dirty or misbound worktrees, unavailable project instructions, failed preflights, or mutation guards blocking the requested operation.

This creates unsafe fallback pressure. Instead of stopping and reporting the real blocker, the LLM may continue with partial context, temp scripts, direct imports, direct API calls, manual workarounds, in-memory session restoration, or undocumented assumptions.

That hides process/tooling defects and causes repeated failures.

Required Default Rule

If an LLM cannot perform a required workflow step, it must immediately enter:

BLOCKED + DIAGNOSE

The LLM must not proceed as if the missing requirement is harmless.

Required Behavior

When a required workflow preflight, skill, tool, capability, worktree binding, identity check, terminal command, mutation guard, or project instruction is unavailable or fails, the LLM must:

  1. Stop before further git or Gitea mutation.
  2. Clearly state BLOCKED.
  3. Diagnose the failure.
  4. Attempt only safe, non-mutating recovery steps.
  5. Report what failed.
  6. Report what was expected.
  7. Report what was checked.
  8. Report what recovery was attempted.
  9. Classify the likely cause:
    • environment/session setup
    • missing skill mount
    • naming mismatch
    • MCP tool/capability defect
    • permission/profile issue
    • dirty or misbound worktree
    • terminal/runtime defect
    • project configuration issue
    • unavailable workflow instruction
  10. Recommend a durable fix.
  11. Recommend or create a follow-up issue only if authorized by role/workflow.
  12. Do not use temp scripts, direct API fallback, MCP internals, direct imports, in-memory state restoration, or manual bypasses unless explicitly authorized by a controller.

Examples of Required BLOCKED + DIAGNOSE Cases

  • Required gitea-workflow skill is unavailable.
  • Codex, Claude, Gemini, or ChatGPT expose different workflow skill names.
  • Terminal command runner is broken.
  • MCP capability resolution fails or resets required lease/session state.
  • Active profile is wrong for the requested role.
  • Runtime workspace binding points to the wrong worktree.
  • Root checkout would be mutated.
  • Dirty files are detected.
  • Runtime dirty-file state disagrees with real git status.
  • Gitea mutation guard blocks because the session is not in an authorized branches/ worktree.
  • Tool schema or required MCP operation is missing.
  • Review, merge, author, or reconciler workflow cannot complete with canonical tools.
  • A required project instruction or checked-in workflow guide cannot be loaded.

Acceptance Criteria

  • Add a canonical workflow rule requiring BLOCKED + DIAGNOSE whenever a required workflow step cannot be completed.
  • Update relevant workflow docs, prompts, templates, and skill guides so LLMs do not continue after missing required skills/tools/capabilities.
  • Add a standard blocker report template with:
    • required step
    • observed failure
    • expected behavior
    • checks performed
    • safe recovery attempted
    • likely classification
    • durable fix recommendation
    • whether mutation occurred
    • single next action
  • Ensure missing workflow skills fail before git or Gitea mutation.
  • Ensure broken terminal/tooling failures are reported as process defects, not silently bypassed.
  • Ensure missing or stale MCP capability state fails closed with diagnosis instead of fallback.
  • Add tests or proof docs showing that missing skill/tool/capability cases stop before mutation.
  • Ensure future controller prompts reinforce this rule.

Suggested Labels

  • workflow
  • guardrail
  • llm-runtime
  • blocked-diagnose
  • process-hardening

Notes

This rule is intended to make process/tooling problems visible and fixable. LLMs should not hide workflow failures by continuing with unsafe or undocumented alternatives.

## Problem LLM workflow sessions sometimes continue after a required workflow step fails or is unavailable. Examples include missing skills, broken terminal execution, MCP capability deadlocks, wrong profile/session state, missing tool access, dirty or misbound worktrees, unavailable project instructions, failed preflights, or mutation guards blocking the requested operation. This creates unsafe fallback pressure. Instead of stopping and reporting the real blocker, the LLM may continue with partial context, temp scripts, direct imports, direct API calls, manual workarounds, in-memory session restoration, or undocumented assumptions. That hides process/tooling defects and causes repeated failures. ## Required Default Rule If an LLM cannot perform a required workflow step, it must immediately enter: `BLOCKED + DIAGNOSE` The LLM must not proceed as if the missing requirement is harmless. ## Required Behavior When a required workflow preflight, skill, tool, capability, worktree binding, identity check, terminal command, mutation guard, or project instruction is unavailable or fails, the LLM must: 1. Stop before further git or Gitea mutation. 2. Clearly state `BLOCKED`. 3. Diagnose the failure. 4. Attempt only safe, non-mutating recovery steps. 5. Report what failed. 6. Report what was expected. 7. Report what was checked. 8. Report what recovery was attempted. 9. Classify the likely cause: - environment/session setup - missing skill mount - naming mismatch - MCP tool/capability defect - permission/profile issue - dirty or misbound worktree - terminal/runtime defect - project configuration issue - unavailable workflow instruction 10. Recommend a durable fix. 11. Recommend or create a follow-up issue only if authorized by role/workflow. 12. Do not use temp scripts, direct API fallback, MCP internals, direct imports, in-memory state restoration, or manual bypasses unless explicitly authorized by a controller. ## Examples of Required BLOCKED + DIAGNOSE Cases - Required `gitea-workflow` skill is unavailable. - Codex, Claude, Gemini, or ChatGPT expose different workflow skill names. - Terminal command runner is broken. - MCP capability resolution fails or resets required lease/session state. - Active profile is wrong for the requested role. - Runtime workspace binding points to the wrong worktree. - Root checkout would be mutated. - Dirty files are detected. - Runtime dirty-file state disagrees with real git status. - Gitea mutation guard blocks because the session is not in an authorized branches/ worktree. - Tool schema or required MCP operation is missing. - Review, merge, author, or reconciler workflow cannot complete with canonical tools. - A required project instruction or checked-in workflow guide cannot be loaded. ## Acceptance Criteria - Add a canonical workflow rule requiring `BLOCKED + DIAGNOSE` whenever a required workflow step cannot be completed. - Update relevant workflow docs, prompts, templates, and skill guides so LLMs do not continue after missing required skills/tools/capabilities. - Add a standard blocker report template with: - required step - observed failure - expected behavior - checks performed - safe recovery attempted - likely classification - durable fix recommendation - whether mutation occurred - single next action - Ensure missing workflow skills fail before git or Gitea mutation. - Ensure broken terminal/tooling failures are reported as process defects, not silently bypassed. - Ensure missing or stale MCP capability state fails closed with diagnosis instead of fallback. - Add tests or proof docs showing that missing skill/tool/capability cases stop before mutation. - Ensure future controller prompts reinforce this rule. ## Suggested Labels - workflow - guardrail - llm-runtime - blocked-diagnose - process-hardening ## Notes This rule is intended to make process/tooling problems visible and fixable. LLMs should not hide workflow failures by continuing with unsafe or undocumented alternatives.
jcwalker3 added the status:in-progress label 2026-07-08 14:28:32 -05:00
Author
Owner

Issue claim heartbeat

<!-- gitea-issue-claim-heartbeat:v1 --> **Issue claim heartbeat** - kind: claim - issue: #552 - branch: pending - phase: claimed - profile: prgs-author - pr: none - blocker: none - next_action: create worktree and begin implementation
jcwalker3 added mcpworkflowtrackergiteamutating and removed status:in-progress labels 2026-07-08 14:29:33 -05:00
Author
Owner

Duplicate search performed (using gitea_list_issues state=all + targeted view_issue)

Searched for:

  • BLOCKED DIAGNOSE
  • missing workflow skill
  • required workflow step unavailable
  • LLM stop diagnose blocker
  • unsafe fallback
  • temp script bypass
  • capability deadlock
  • broken terminal command
  • missing tool preflight

Results:

  • No exact match for the general default rule "Require BLOCKED + DIAGNOSE when LLM cannot perform required workflow step".
  • Closest: #551 "Codex sessions do not mount required gitea-workflow skill" — specific to Codex mounting + mentions BLOCKED for missing skill, but not the canonical general rule across all LLMs/workflows.
  • Related but specific: #548/#547 (preflight clear in adopt), #546 (lease clears preflight), #539 (bypass mutations + direct API), #514 (raw branch delete bypass), #535 (lease recovery non-bypassable), preflight issues like #469/#470, EOF/MCP issues #543/#544.
  • No issue defines the exact default behavior + blocker report template + acceptance criteria for all required step failures.

Created: #552
URL: #552

Labels applied: workflow, mcp, tracker, gitea, mutating

Mutations besides issue creation:

  • gitea_mark_issue (start) — claimed, posted heartbeat comment #7205
  • gitea_set_issue_labels (applied 5 labels)

No other git/Gitea mutations. Worktree used for guard compliance: branches/issue-blocked-diagnose-rule

Next action: Implement the rule in workflow docs, prompts, skill guides, and add blocker report template + tests/proof as per acceptance criteria. Claim #552 for implementation.

## Duplicate search performed (using gitea_list_issues state=all + targeted view_issue) Searched for: - BLOCKED DIAGNOSE - missing workflow skill - required workflow step unavailable - LLM stop diagnose blocker - unsafe fallback - temp script bypass - capability deadlock - broken terminal command - missing tool preflight **Results:** - No exact match for the general default rule "Require BLOCKED + DIAGNOSE when LLM cannot perform required workflow step". - Closest: #551 "Codex sessions do not mount required gitea-workflow skill" — specific to Codex mounting + mentions BLOCKED for missing skill, but not the canonical general rule across all LLMs/workflows. - Related but specific: #548/#547 (preflight clear in adopt), #546 (lease clears preflight), #539 (bypass mutations + direct API), #514 (raw branch delete bypass), #535 (lease recovery non-bypassable), preflight issues like #469/#470, EOF/MCP issues #543/#544. - No issue defines the exact default behavior + blocker report template + acceptance criteria for all required step failures. **Created:** #552 **URL:** https://gitea.prgs.cc/Scaled-Tech-Consulting/Gitea-Tools/issues/552 **Labels applied:** workflow, mcp, tracker, gitea, mutating **Mutations besides issue creation:** - gitea_mark_issue (start) — claimed, posted heartbeat comment #7205 - gitea_set_issue_labels (applied 5 labels) No other git/Gitea mutations. Worktree used for guard compliance: branches/issue-blocked-diagnose-rule **Next action:** Implement the rule in workflow docs, prompts, skill guides, and add blocker report template + tests/proof as per acceptance criteria. Claim #552 for implementation.
jcwalker3 added the status:in-progress label 2026-07-08 14:40:10 -05:00
Author
Owner

Issue claim heartbeat

<!-- gitea-issue-claim-heartbeat:v1 --> **Issue claim heartbeat** - kind: claim - issue: #552 - branch: issue-552-blocked-diagnose - phase: claimed - profile: author - pr: none - blocker: none - next_action: create worktree and begin implementation
sysadmin removed the status:in-progress label 2026-07-09 08:30:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#552