Bounding box of polygons intersection via boost geometry

I am trying to calculate the bounding box of the polygon which is result of intersection of 2 polygons. In my case, poly1 lies completely inside poly2 and I am aiming to get bounding box which just encapsulates poly1.
I am hoping to get code which works for the case when poly1 and poly2 overlap partially and not just completely within each other

                boost::geometry::Polygon poly1;
                
                // Additional code to populate poly1 
                // 

                boost::geometry::Polygon poly2;
                
                // Additional code to populate poly2 
                // 

                boost::geometry::correct(poly1);
                boost::geometry::correct(poly2);

                std::deque<boost::geometry::Polygon> output;
                // Check poly1 inside poly2
                // This check is TRUE with the data I have

                bool completely_inside = boost::geometry::within(poly1.outer(), poly2.outer());
                if (completely_inside)
                {
                    output.push_back(poly1);

                    boost::geometry::model::box<boost::geometry::Point> box;
                    boost::geometry::envelope(output(0).outer(), box);
                }

Issue is that bounding box above is much bigger than the bounding box of the intersection of the 2 polygons. I am not sure what is wrong in above code as i am following right process.