Skip to content
Agentmart
Submit a tool

llm-empty-plan-controller-fallback

When a planning LLM returns an empty action list, force a deterministic verification action from a priority-ordered fallback list so the agent never spins on…

Skill by kjuhwa

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/kjuhwa-llm-empty-plan-controller-fallback

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

When a planning LLM returns an empty action list, force a deterministic verification action from a priority-ordered fallback list so the agent never spins on "no actions chosen".

Use cases: ml, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/llm-empty-plan-controller-fallback

What's inside

Skill name
llm-empty-plan-controller-fallback
Description
When a planning LLM returns an empty action list, force a deterministic verification action from a priority-ordered fallback list so the agent never spins on "no actions chosen".
License
MIT
Instructions
36 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# LLM Empty-Plan Controller Fallback

## When to use
Your planning LLM occasionally returns `actions: []` (e.g. for healthy or sparse alerts), which would route the agent into a no-op loop. You want the controller to seed at least one verification action so the agent makes progress and either gathers evidence or proves there's nothing to gather.

## How it works
- After parsing the LLM plan, if `planned_actions` is empty AND there are `available_action_names` (so we *can* do something), iterate a curated fallback list (most-broadly-useful queries first).
- Pick the first fallback that's available; record it with a clear rationale ("Controller fallback: LLM returned empty plan...").
- If none of the curated fallbacks are available, just take `available_action_names[0]`.

## Example
```python
if not planned_actions and available_action_names:
    fallback_candidates = [
        "query_grafana_metrics", "query_grafana_logs",
        "query_datadog_all", "query_datadog_logs",
        "query_honeycomb_traces", "query_coralogix_logs",
        "get_cloudwatch_logs", "get_host_metrics",
        "list_eks_pods", "get_eks_events",
    ]
    for candidate in fallback_candidates:
        if candidate in available_action_names:
            planned_actions = [candidate]
            plan_rationale = "Controller fallback: LLM returned empty plan. Forcing verification action."
            break
    if not planned_actions:
        planned_actions = [available_action_names[0]]
        plan_rationale = "Controller fallback: LLM returned empty plan. Forcing available verification action."
```

## Gotchas
- Pair this with a hard loop cap — if the fallback action returns no useful evidence and the LLM keeps returning empty, you still need an upper bound to terminate.
- The fallback list ordering matters: prefer high-signal/low-cost queries first.
- Always set `plan_rationale` to a string the user will see in traces; "controller fallback" is honest and easy to grep for in production.

From kjuhwa/skills-hub, MIT.

More from kjuhwa/skills-hub

Signals

Stars
0
Forks
0
Open issues
17
Last commit (this folder)
Apr 25, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from kjuhwa

Cite this page

llm-empty-plan-controller-fallback skill. Agent Mart. https://agentmart.dev/skills/kjuhwa-llm-empty-plan-controller-fallback (last updated 2026-10-24)