Flight Crew Instrument; Flight Crew Commercial; Flight Crew Multiengine; Flight Crew Private
Communication Breakdown; Distraction
ATC Issue All Types; Deviation / Discrepancy - Procedural Published Material / Policy
Air Traffic Control Issued New Clearance; Air Traffic Control Provided Assistance; Flight Crew Requested ATC Assistance / Clarification
Human Factors
After takeoff; tower advised a different [Company Aircraft] to contact departure. Since we knew there were no other Company airplanes airborne in the vicinity; I queried the tower as to whether they intended for us to contact departure instead. Tower replied 'negative' and told us that someone else had taken our squawk code. Tower seemed very confused as to which Company flight was airborne. Tower again told a different [Company Aircraft] to contact departure; and that crew advised that they were still taxiing to the runway. At that point Tower directed us to squawk 1200 and again mentioned that someone had taken our squawk code. At about this time I pointed out to her that we were still flying the runway heading and maintaining 3;000 feet (our takeoff clearance). Tower then told us to contact departure. I immediately switched frequencies and advised departure of our heading and altitude and that we were squawking 1200. They gave us an immediate left turn to the south and a climb to 8;000 feet. They assigned a new squawk code and the rest of the flight was uneventful.It seems to me that somehow the tower controller got the squawk codes for two Company flights swapped. Although Tower cleared us to takeoff using our correct callsign; Tower seemed to have it in her mind that the other Company flight was actually airborne.I really can't say what caused our squawk codes to be swapped. The Captain and I followed FOM procedure perfectly with regards to both of us listening to a voice-issued ATC clearance. We read back the clearance and assigned squawk and received a 'Read back correct.' I really don't see any way we could have mistakenly put in an incorrect squawk code that just happened to be exactly the code assigned to another Company aircraft on that same ramp on that same night.
Air carrier pilot reported confusion resulted when ATC swapped their squawk code with another company flight.