Hi Claudia, sorry to hear about this problem with Shaggy
I hope it is stress but keep a VERY close eye on this, there is a disease in Octis that causes autophagy. It is incredibly infectious (to other octis not us!!) if your octi keeps doing it chances are he's got it (sorry, I HATE this

) Bernd Budelmann put out a paper on the condition. According to him autophagy is NOT associated with stress, autotomy is, this is where the octi bites off the arm but does not eat it. The suggestion is that autophagy may be caused by a bacteria, virus or prehaps even a prion (mad cow disease is caused by one of these).
I don't want to be a doom merchant (I sure hope your wee guy is OK), but if it turns out he has this disease it is essential you gut your tank and sterilise EVERYTHING. I would biff the substrate and anything you can chuck out and replace I would.
We had this disease in our octi display tanks once and we didn't completely sterilise and our next octi got it too. So we gutted the tank, got new rockwork etc redid all the plumbing biffed the nets etc AND had the tanks sitting full of a 25% solution of Sodium Hypochlorite (yep bleach ) for a few days. We then neutralised it (can't remember what with, but your supplier should be able to help with this) for a couple of days then let the tank dry out. Only then did we redo the rock etc refill and look for new inhabitants. We've had no more problems.
I sure hope it's not this but it's best to be aware that it's possible.
Hope I haven't scared you too much (that's probably a vain wish, but if Shaggy were mine I'd want to know)
Keep us all posted on how Shaggy's doing.
Best wishes Jean
Reference: Budelmann, B., 1998. Autophagy in
Octopus South African Journal of Marine Science vol. 20, p. 101-108.