{"record":{"id":"58f18197368cf15f","repo":"CanineHQ/canine","slug":"command-failed-with-exit-code-exit-status-exitst","errorCode":null,"errorMessage":"Command failed with exit code #{exit_status.exitstatus}","messagePattern":"Command failed with exit code #(.+?)","errorType":"exception","errorClass":"Cli::CommandFailedError","httpStatus":null,"severity":"error","filePath":"app/services/cli.rb","lineNumber":68,"sourceCode":"        end\n\n        # Wait for process to complete or be killed\n        exit_status = wait_thr.value\n\n        # Ensure output threads complete\n        stdout_thread.join\n        stderr_thread.join\n\n        # Stop monitoring thread\n        stop_monitor_thread\n\n        if @killable&.reload&.killed?\n          @loggable.error(\"Process was killed by user request\")\n          raise CommandFailedError, \"Process was killed\"\n        elsif exit_status.success?\n          @loggable.success(\"Command succeeded\")\n        else\n          raise CommandFailedError, \"Command failed with exit code #{exit_status.exitstatus}\"\n        end\n\n        exit_status\n      end\n    ensure\n      stop_monitor_thread\n    end\n\n    private\n\n    def start_monitor_thread\n      @monitor_thread = Thread.new do\n        loop do\n          sleep 1 # Check every second\n\n          if @killable.reload.killed?\n            kill_process if @process\n            break","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/CanineHQ/canine/blob/ba4ee3968d8513ee27d8583fbd3e854a8dd053f3/app/services/cli.rb#L50-L86","documentation":"Error \"Command failed with exit code #{exit_status.exitstatus}\" thrown in CanineHQ/canine.","triggerScenarios":"Thrown at app/services/cli.rb:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ba4ee3968d8513ee27d8583fbd3e854a8dd053f3","analyzedAt":"2026-08-23T17:49:27.834Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}