Toilet tank only fills right after shutting off main water line.
Long story short, basement toilet wasn't in use for close to a year. After flushing it a couple of times, it failed to fill. Nothing was changed with the plumbing.
I removed all the hoses associated with the toilet and no water came out of the pipe coming out of the wall. The toilet is just a few feet from the water heater and the cold water line it's tapped into. They are separated by a wall. So you have the pipe coming from the main water shut off, going to the water heater, with the toilet drop some 8-10 feet before the heater.
Now, the part that has us stumped, the toilet starts filling a few seconds after the main water valve is shut off and then again a few seconds after it's turned on. Just replaced the fill valve earlier today in hopes of it working and nothing.
Another thing we noticed a few months ago is that if any toilet in the house is flushed, there's a single water hammer thump/whoosh coming from the sump pump or whatever that big hole in the ground by the heater is.