Critical to the success of any real world agent is the ability to detect and recover from unsuccessful actions. Failing to detect these errors may cause the execution of the remainder of a plan to have unexpected and dangerous effects. In this paper we present ED (the error detective) which systematically executes lesioned operators in order to generate a table of errors and associated causes for a software agent. We describe features of software environments that allow us to efficiently build this table without searching for simultaneous errors or making the single fault assumption. We then report on experiments comparing several methods for utilizing this collected data to build an error diagnosis function.