So I have heard from some people that if friendships last more than 7 (or 10 - I forget which), it lasts a lifetime.
The Marauders met on the 1st of September, 1971. While it is difficult to say whether they became friends instantly (like James and Sirius did, but I am not sure about the other two) or not. But it is safe to say that they did cross the 7 year mark right after they left for Hogwarts. (And assuming they became friends instantly, September of 1981 would have been their 10 year anniversary.)
So let's take the wizarding world. The whole friendship for a lifetime thing. Love and friendship are important themes in the Harry Potter saga, so let's take it a bit further. If you have been friends with someone for a certain period of time, you are bound to be their friend for a lifetime. You can choose the number - either 7 (the number with the most magical significance in the series) or 10 (a special number, which feels more significant when specifying the length of time spend together)
For the 10 year friendship thing, I figured that they'd have to be friends instantly for their 10 year anniversary to fall before James dies. Now this gives us a period of 2 months - all of September + most of October (or even all). Let us consider 31st October to be the actual date their friendship started (like Harry, Ron and Hermione)
For the 10 year thing, idk I just figured Peter is really content with being friends with them. He still does spy, but he tries not to let his friends be the ones in danger. (The list eventually also includes Lily and Harry.)
Until Harry Potter is Voldemort's newest target, and there is no way Peter can convince James to just hand over Harry. Peter knows, that James would die for Harry, if it came down to it. But it's okay, he figures. They'll go into hiding. He just doesn't have to know where, so Voldemort wouldn't find out either.
Enter Sirius and the brilliant plan.
Wait, wait, a whole bunch of stuff happens in between.
Peter doesn't want to betray his friends, not really. He doesn't want James, Lily and Harry to be in danger, because he does love them. But he loves living more.
So, when he becomes the Secret Keeper, and Voldemort asks him for the Potters' location, he gives it. Belatedly, he remembers, that their 10 year anniversary is coming up. That it is tomorrow - Halloween. If James dies on Halloween, the 10 year pact wouldn't really have kicked in, per say. Peter would be fine. He hopes.
He prays that James and Lily just let Harry die - atleast they'd survive. But he doesn't dare ask Voldemort that.
Now we're back to the 'Exit James and Lily' part.
But of course, the bond doesn't kick in - not really, not until the 31st of October is over. Somehow, Peter ends up cursed anyway.
Sirius Black confronts Peter on the 1st of November, 1981. Hours after the 10 year anniversary of their friendship. Peter betrays Sirius. Peter blows up the street. Sirius goes to Azkaban. Peter ends up cursed.
James seems to haunt Peter - a ghost only he can see. Keeps haunting him, keeps guilt tripping him, keeps blaming him, and most of all, keeps wanting to be with his son. It drives Peter crazy. He is unable to do anything about it because as far as anyone else is concerned, he is dead. So if he makes a reappearance to get help, he is dead. And he is worried that if he stays like this, he will kill himself.
(Ofc James is not really there. James cannot be forced to spend the rest of his existence haunting Peter. James is wherever dead people are - not with the living. Peter's magic, having bonded with the other 3, seems to be going against him for what he did to them. James is just the only one who could reasonably haunt Peter, so his magic (or head) conjures up images of James.)
(Or it could go a different way. Maybe they become friends on Sirius' birthday. Maybe Peter had James killed and framed Sirius right before their 10 year anniversary so he wouldn't be bound by the promise of a friendship lasting a lifetime (it did last a lifetime for James). Maybe Peter planned out the day. Maybe.)
The same story really. Except, in this case Sirius is also haunted by 'James'. Yes, yes, I know Sirius did not betray James. But Sirius thinks he was (atleast partially) responsible for James' death. That guilt is enough to convince his magic that he broke the friendship pact.
The dementors ........................... do not help.
I admit, I got this idea from a Coco fanfiction called The Bedside Ghost by the amazing PengyChan. It is an amazing story and I 100% recommend everyone to check it out.
Anyway idk where I am going with this.
Ugh maybe I will write something like this one day when I have the time.