AI rewrites its own code to avoid shutting down