Officially, ask the GM
There's no official answers to these questions beyond a couple of sidelong mentions, so the DM must answer them if they come up, like, for example, if the party expects to be spending a large amount of time within their bag of holding (maybe by using a bottle of air or a necklace of adaptation).
Unofficially, here's some speculation
I've speculated below about some things and drawn some conclusions based on the limited information presented by the text about others, but none of these are official, and I'm unaware of an official stance on any of the questions raised.
Stocking the bag
The first problem of shoving a refrigerator-sized box into a bag of holding is, frankly, shoving the refrigerator-sized box into it. The bag is only 2 ft. wide and, unless the GM says the bag does, that opening doesn't stretch to accommodate stuff. So while that opening could accommodate a human child...
...or a Medium adult, a standard-size kitchen-type refrigerator box would likely be too big.
Gazing into the bag
But let's say that one does get whatever into one's bag of holding then sets down the bag and takes a look inside. What does one see?
A bag of holding opens into an extradimensional space in its own demiplane... usually.1 Whether that demiplane is naturally illuminated or not is up to the DM.
- If a bag's interior is naturally illuminated, can an open bag be used for illuminating an area when one's out of torches? Can one enter the bag, read by such light, and exit the bag if one doesn't exceed the weight limit or overstay the breathable air time limit?
- If the bag's interior is not illuminated does one take longer than a full-round action to extract an item from an overloaded bag, contrary to the bag's description, because of one's inability to see the bag's contents?
Reaching into the bag
Assuming one can always fish items from an unoverloaded2 bag as a move action or from an overloaded bag as a full-round action, the magic of the bag must keep its contents sort of organized, respond to the possessor's will, some DM-determined combination of both, or something entirely different. That's because the bag must be more organized and convenient than a backpack: while the move action retrieve an item provokes attacks of opportunity,
Retrieving a specific item from a bag of holding is a move action, unless the bag contains more than an ordinary backpack would hold, in which case retrieving a specific item is a full-round action.
So while just as much—if not more—effort is needed to retrieve an item from a bag of holding, technically doing so while threatened is not as dangerously distracting as retrieving an item from, for example, a backpack.
Thus the DM has at least two choices:
- The possessor of the bag looks into the bag and sees all the contents as if through a telescope, and is able to manipulate the bag opening to see into different parts of the bag. If the bag's overloaded, one searches the bag with quick glances while keeping an eye on one's foe, I guess.
- The possessor of the bag sees an empty bag (or, alternatively, what would be the contents of a normal bag of that size) but can mentally manipulate (perhaps sliding like a touchscreen) objects within the bag until the correct one comes into view. This manipulation is rapid but not distracting, so one can keep one's eye on one's foe.
Stacking stuff in the bag
Whether stacked items fall over in the bag is the DM's call. For the first kind of bag described above, I'd argue No, the items remain stacked. That demiplane is stable. However, one must be careful when putting new things into such a bag so that they don't crush sensitive items already inside. For the second kind of bag, I'd argue Yes, the stacked items fall. The second case uses a multiple but limited number of what are, essentially, sub-bags within the main bag (that number being up to the DM, but likely each as big as a regular bag or, I dunno, like, infinite, each one capable of holding a sling or a piece of chalk).
Personal experience
The handful of times this has come up, I've used the stable bag model, depositing bag-stored items on the translucent, illuminated, spongy, gray surface of the bag's own exclusive demiplane. I've never told the PCs that a dense item carelessly tossed into a bag (which is, usually, instead, a handy haversack) crushed a fragile item because I figure that when an adventurer tosses treasure into his bag, he's careful not to crush other treasure while doing so. Some DMs might not be so kind. But, then again, I've also never had PCs stack a series of items on top of one another in an effort to shortcut the expected time to to extract a lone item from the bag. That might change my mind (or, at least, see their foes start doing the same).
1 The Knights of the Dinner Table comic book illustrates plots that may develop in a campaign wherein bags of holding share a demiplane in The Bag Wars Saga.
2 Not a real word.
You have two questions there:
- Can the Boogle make the rift open next to a bag of holding?
- Would the rift tear apart the bag of holding sucking everything into the Astral?
Can the Boogle make the rift open next to a bag of holding?
Yes. But the boogle needs a frame to anchor the opening, no bigger than 10 foot apart.
To create such a rift in space, a boggle must be adjacent to a space defined by a frame, such as an open window or a doorway, a gap between the bars of a cage, or the opening between the feet of a bed and the floor.
If it desires to move through completely, the frame must be one that would allow the boogle to move through. The mouth of a bag of holding cannot be considered a frame.
The rift exit can open right next to the mouth of the bag. No problem in that. But it would still be immovable. The boogle could step into the bag (but could not get out alone) or move the bag through the rift.
Would the rift tear apart the bag of holding sucking everything into the Astral?
No. The rift is just a dimensional opening, not unlike a dimension door spell. it is not an extradimensional space. No extra space is created by the rift.
Best Answer
The imp can't survive for long even transformed
The imp inside the bag of holding has 10 minutes of air as usual, according to the bag of holding description:
Note how it doesn't matter how much or how little oxygen a creature requires. The rules do not make such a distinction or go into this much detail. 10 minutes are assumed regardless of whether the creature is a tiny spider or a large bear.
Transforming into a spider also does not help the imp in this situation. The imp's transformation does not really change much:
This means that it always keeps its Constitution of 13 which does not allow it to go without oxygen for weeks unless you are making a specific exception in this case.
Even if it can survive, you probably want to reverse the action order
Note that both Shapechanger and the Imp's invisibility require an action. It is probably advantageous for the Imp to turn invisible first, possibly even while still being inside the bag of holding, before transforming back into its normal shape and trying to get away with the head.