It still depends though...............
If you were just coming up with bass lines to go with what was being played in the "jam", then your still technically out of luck.
Unless you came up with a part, or write a bassline that becomes an integral part of the song - no credit.
It kind of comes down to this:
Either you have to have had the idea for parts of the song that the others had to play, or you have to write a bass part that defines the overall sound of the song.
You realize that makes zero sense, right?
That's not an attack towards you but think this through. If you're playing along in a jam then you're obviously going to be listening to everyone in order to figure out how to better fit your line in. Likewise, everyone is going to be listening to you to figure out how to fit their own part in. That means everyone is creating at the same time and is writing together. Who has written the song at this point?
Let's say we're jamming in A minor and I decide to do a walk down to G and then to F (just to keep things simple, and let's pretend it's some major moment that defines the song). We play through the progression again and this time everyone else now plays the walk down for the progression, and after we jam we decide we're going to keep it in the song. I just defined the songs progression and have established a focal point for the melody to work off of. Who has written the song at this point?
Let's then go on to say that at next rehearsal our singer comes in with come lyrics and throws them on top of the song and then the rest of us throw some harmonies behind it. Who has written the song at this point?
This has been a repeating question that I've had. How do you define a songwriter? How do you define the songwriting process? How do you define who gets credit? Was it a song when it was a jam? Was it a song only after I defined the progression? Was it a song when the singer added words after the fact? This is important for me to know because, quite honestly, no one in my band really writes or comes in saying, "the beat is this, the riff is this, the bass is this, etc..." The most we might get is, "Hey, I wrote this riff, let's jam on it" and from there we all create the rest of the song together.