Print does first line then goes wonky

OctoPrint hasn't got a clue about the filament runout sensor, that's strictly a firmware-dealing thing (unless of course, you connect the sensor to OctoPrint using a plugin).

So, finished work for today.

Can you tell us how you connected the filament sensor switch to the board
and how do the marlin settings for the sensor look like.

To pc15 on the board, and in marlin changed runout to pc15 in the pins file. The thing that fixed it was changing the runout state to HIGH instead of LOW. I have tried files from both octoprint and just from the SD card and cut the filament and it stops it in both cases. I still find it weird it only stops the print through octoprint if it begins the print without filament sensor being tripped. I mean thats a good thing unless your like me and forgot you messed with the firmware late night.