There is a distance limit. It depends on the baseline, the focal length and the pixel pitch.
The depth information is calculated by comparing two feature points in the two images. The difference in point position is called disparity. In rectified, parallel stereo cameras you end up with a disparity map. This contains all the information for depth calculation, you only need the baseline and focal length of your two cameras.
The further away your point in space is, the smaller the disparity becomes. A point at infinity will have zero disparity.
Test this with a camera. You could do this with the sun but for safety I'd recommend a really far away mountain. Take the camera. Point it at the mountain, take a picture. Move it perfectly parallel to the direction it is pointing. Take another picture. The object should not have moved. The test will probably fail because you can't move the camera that parallel.
However, there is a practical limit to the disparity. We can only calculate the disparity for discrete values (ignoring subpixel accuracy). Therefore the smallest values we can distinguish are between 0 and 1. So the disparity can be at 0px or at 1px. At 0px it would be at infinity and for 1px it would be the furthest away that we can still say something about the distance.
Given your pixel size in mm x, the focal length f and the baseline b we get the furthest distance as:
d = f * b / x
Here is how to get to my calculation.
Sketch 1: Assume cameras are parallel by baseline, object is at distance d and use the standard pin-hole camera model.
Sketch2: Transform sketch 1 so that the cameras are atop each other and the object has split into two points. The first point is seen straight ahead, and the second is seen towards the side by a distance of b.
Calculations: Now x can be calculated using triangle ratios. To make a distinction of depth the length x must be 1px, or the equivalent length in mm.