Commercial Fixed Wing
Flight Crew Air Transport Pilot (ATP); Flight Crew Instrument; Flight Crew Multiengine
Situational Awareness; Training / Qualification; Distraction
Aircraft Equipment Problem Less Severe; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance
Air Traffic Control Issued New Clearance; Flight Crew Returned To Clearance
Human Factors; Environment - Non Weather Related
At gate X in ZZZ; filed to ZZZ1 on the ZZZX Departure. The flight plan after the SID started at ZZZ.  We requested log-on from ZZZ2 for the departure clearance 30 minutes prior to push.  Flight plan (legs) verification accomplished per SOP.  First Departure clearance came about 20 minutes prior to push indicating a new clearance for the ZZZZZY; ZZZZZ [Intersection]; as filed.  Started to update flight plan to account for this.  While editing flight plan; another Departure Clearance came in for ZZZX; ZZZ [VOR]; ZZZZZ [Intersection]; AF.  Started editing flight plan again to account for reversion to original flight plan and SID.  Completed another flight plan verification from ZZZ.  Completed briefing. Standard push back and taxi for [Runway] XXR.  Completed before takeoff checklist; inclusive of the 'runway confirm.'  Both the FO and myself think we both saw the correct runway on the ND during the final check; as well as the departure brief.   On takeoff; very early after liftoff; switched to Departure Control.  Very early in climb; 'NAV' engaged; catching me off guard as it seemed like we were below 400 feet; commanding a hard right turn.  I instinctively followed the flight directors initially.  In the turn; still below thrust reduction altitude (1;000 feet); I realized from my briefing that the turn should have been to the left; not the hard right turn the flight directors were commanding.  I started to correct back to the left.  I did not see any traffic in our immediate vicinity on TCAS. ATC then assigned us a heading of 350.  As we were in the turn to Heading 350 ATC mentioned that we were supposed to turn left. I believe were around a northerly heading when we hit 1;000 feet; our thrust reduction altitude.  We apologized to ATC and inquired if there was a traffic conflict; which he replied 'no.'  He handed us off.  About 60-90 minutes into the flight we were notified over CPDLC of a possible pilot deviation and to call TRACON.  I called TRACON and the Supervisor was very cordial.  He explained what they had seen; and we also told him what had happened on our end.  He told me they had been seeing this event a fair amount lately.  Coincidentally; on the same aircraft yesterday for the outbound flight to ZZZ; we had to have maintenance reset the FMC's on the ground in ZZZ1 because both with; and without; a Flight plan in the FMC; as soon as the flight directors would be turned on the lateral 'NAV' mode would engage and command a hard right turn.  We tried resetting everything; inclusive of the ADIRS; swapping the nav data base; and the same thing kept happening.  After maintenance reset the FMC's problem went away.  Caught/detected by myself (PF) below thrust reduction altitude of 1;000 feet.  Correction applied.First flight and operation into a busy complicated airport in over 6.5 months due to the COVID situation.  Numerous cockpit distractions during cockpit setup.  Several ATC digital clearances within a short period of time.  External stresses caused by current state of affairs currently going on within our country and our company.  Potential aircraft navigation technical issue; however; I cannot rule out pilot error.  Possible pilot error scenarios would be; departure procedure in the FMC jarred/messed up by the second CPDLC clearance route uplink; and subsequently not caught during second flight plan verification.  Potentially wrong runway set in FMC during cockpit setup. The FO and I don't believe it is the incorrect runway scenario because we did the Flight Plan verification; briefing; and final runway confirmation approaching the runway threshold as per SOP; and we believe we saw the digital representation of the runway on the ND.  But I have to admit this is a possibility.  At all times all SOPs were adhered to the best of our knowledge.
It was a busy morning out of ZZZ. Our flight plan called for the ZZZX Departure. The automatic upload for the flight plan wasn't working so my Captain was manually loading the flight plan. We received our new clearance indicating the ZZZZZY; ZZZZZ [Intersection]; AF. We then fixed the computer and did a flight plan verification. Then we received another clearance; ZZZX; ZZZ [VOR]; ZZZZZ [Intersection]; AF. We fixed it in the box; did another verification.   After takeoff; it seemed very early the airplane went into nav mode; with a right turn. Before I could say anything my Captain was correcting the turn. And before that ATC told us to turn left to 350. He then mentioned we were supposed to turn left on the ZZZX not right. We apologized and continued without incidence. Cause - Second flight on over 7 months; due to COVID. A bunch of cockpit distractions; followed by multiple different clearances; and airplane malfunctions with automatic uploads. Bottom line SOPs were followed to best of our knowledge. Verify; verify; verify.
Air carrier flight crew reported turning right instead of left on departure. Both pilots referenced lack of flying as a contributing factor.