Skip to main content
Diagnose a failed command and suggest fixes.

Description

The debug-failure prompt provides a systematic approach to diagnosing and fixing failed container operations.

Parameters

Generated Instructions

When invoked with:
Returns:

Example Usage

Debug Build Failure

Debug Test Failure

Common Error Patterns

Missing Dependencies

Symptom: ModuleNotFoundError or command not found Solution: Install missing packages with install-packages or use a prepared environment.

File Not Found

Symptom: No such file or directory Solution: Verify path with list_files, ensure files are synced with rsync.

Timeout

Symptom: timed_out: true Solution: Increase timeout parameter or break into smaller operations.

Permission Denied

Symptom: Permission denied Solution: Commands run as root, so check if file exists and is accessible.

Implementation Notes

The agent should:
  1. Retrieve operation with get_operation:
  2. Analyze the result:
    • Check exit_code (0 = success, non-zero = failure)
    • Read stderr for error messages
    • Check timed_out flag
    • Review stdout for partial output
  3. Diagnose based on error patterns:
    • Import errors → missing packages
    • File not found → path issues
    • Timeout → need more time or optimization
  4. Suggest and implement fixes

See Also