Move context information into the main loop so it can be used to interrupt the loop or start auto-compaction.