Skip to content

Reconcile llm_pilot.py with MCP-only control mandate #36

@Coldaine

Description

@Coldaine

Problem

CLAUDE.md states:

Never run llm_pilot.py or any autonomous loop as the controller. The agent IS the controller.

Yet agent_orchestrator/llm_pilot.py (370 lines) exists, is fully functional, and is the only thing that reliably runs ALAS tasks today. It has:

  • PID-file-based single-instance guard
  • Process lifecycle management (--kill, --restart)
  • Cooldown-based task scheduling
  • Recovery-to-main on failure
  • Startup grace period for state detection
  • Skip flags (--skip-mail, --skip-tool)

This script exists because the MCP path isn't robust enough to actually drive things. That's the real signal.

The Contradiction

Aspect What CLAUDE.md says What llm_pilot.py does
Controller "LLM is the scheduler" Python while-loop is the scheduler
Tool calls "Call ONE MCP tool at a time" Calls tool.execute() directly, no MCP
Recovery "Use adb_screenshot + vision" recover_to_main() via state machine, no vision
Decision making "LLM decides what to do next" Hardcoded TASKS list with cooldowns

Options

Option A: Delete it

If the MCP path (Issue #35) is fixed to be robust enough, llm_pilot.py becomes unnecessary. Delete it and rely on the LLM agent driving MCP tools.

Risk: Until #35 is done, there's no reliable way to run the bot.

Option B: Keep as fallback, deprecate

Mark it as a temporary fallback for when MCP isn't available. Document that it's not the intended control path. Remove it once MCP is robust.

Option C: Absorb useful patterns into MCP

The cooldown logic, startup grace period, and skip-tool patterns are useful. Extract them into MCP tools or config rather than a standalone script:

  • Cooldown tracking could be a config/state query
  • Startup grace could be part of adb_health
  • Skip flags are agent-level decisions

Recommendation

Option C (absorb then delete), gated on Issue #35 completion:

  1. Fix MCP server (MCP server v2: non-blocking primitives, health probe, CLI mode #35) so it's robust enough for LLM control
  2. Extract useful patterns from llm_pilot.py into MCP tools
  3. Delete llm_pilot.py
  4. Update CLAUDE.md to remove references to it

Related

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions