I think I figured out the cause: bile released from your liver.
“The liver secretes a bright green fluid called bile into the small intestine or it is concentrated and stored in the gallbladder.
Bile plays a role in the emulsification, absorption, and digestion of fat and fat soluble vitamins. It helps to soften stools and is responsible for giving stools their characteristic brown color. Bile helps to alkalinize the contents of the intestines. It is made up of bile salts, cholesterol, phospholipids, bilirubin, and electrolytes.
As bile makes its way through to the small intestine and then to the large intestine via the bile ducts, it progressively changes color from green to yellow to brown, due to the action of bacteria in the large intestine on the bile salts.
Green stool often indicates that food has passed through the intestines faster than normal (called decreased bowel transit time), before it could be changed from green to brown.”