Date: 202108
Local time of day: 1801-2400
Location: ZZZ.Airport, US
Flight conditions: VMC
Aircraft: B737 Next Generation Undifferentiated
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Climb
Airspace: Class B ZZZ
ATC / advisory: Tower ZZZ
Aircraft component: Navigational Equipment and Processing
Reporter organization: Air Carrier
Reporter function: Captain; Pilot Not Flying
Reporter qualification: Flight Crew Multiengine; Flight Crew Air Transport Pilot (ATP); Flight Crew Instrument
Human factors: Situational Awareness; Time Pressure; Workload; Confusion; Distraction
Second reporter function: First Officer
Anomaly: Aircraft Equipment Problem Critical; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural Published Material / Policy; Inflight Event / Encounter Fuel Issue
Detector: Person Flight Crew
When detected: In-flight
Result: Air Traffic Control Provided Assistance; Flight Crew Overcame Equipment Problem; Flight Crew Overrode Automation; Flight Crew Requested ATC Assistance / Clarification
Contributing factors: Aircraft
Primary problem: Aircraft

Narrative: Climbing through approximately 500 ft. AGL in a right turn to 360; the departure heading selected on the MCP by the FO (First Officer) prior to takeoff; the FO's flight director; FD2; failed; the MCP (Mode Control Panel) altitude window indicated 50;000; not the pre-takeoff selected altitude of 3;000; and the FO's command bars biased out of view. The PF continued the climbing turn using PFD (Primary Flight Display) raw data in night-time VMC conditions. Cross-checking respective PFDs revealed no flags or indications as to the specific failure.In the busy initial climb segment; confusion as to the cause of current flight instrument condition gave way to confidence in the raw data. Directing the PF to continue to climb using raw data; I attempted to select 3000 ft. on the MCP; the altitude knob spun freely without any effect on the window. I then turned off the FD1 and FD2; reselected 3000 ft. in the MCP altitude window; confirmed the heading bug was at 360; selected heading; and turned the FD switches back on; FD2 first; in an attempt to restore FD2 guidance for the PF. Immediately upon switching on FD2; the MCP altitude returned to 50;000 and no command bars appeared on the FO's PFD.Switching to Departure Control; ATC gave us direct routing to the first fix; ZZZZZ; and continue climb to 11;000. I asked ATC for a heading; mentioning our concern that our navigation might be unreliable. They provided a 010 heading which when selected; had no effect on the FO's heading bug. Changing heading on the MCP failed to change the bugs on the FO's ND (Navigation Display) and PFD compass displays. I confirmed compass heading on the wet compass corresponded with both the Captain's and FO's compasses. They asked if we needed to declare an emergency; I declined as we had good raw data and were still diagnosing the malfunction.I attempted a second reset of FD2 with the same negative result. Leveling at 11;000; the PF reported the autothrottles were not holding commanded airspeed; we disengaged the autothrottles. Turning both FDs off again and selecting FD1 on provided accurate command bars on the Captain's PFD. We agreed that continuing using raw data was possible; and that full FD capability was available from FD1. I transferred aircraft control to myself and agreed with my FO's suggestion of going to the QRH for additional troubleshooting/procedural steps. A satisfactory QRH procedure to handle this malfunction was difficult to find and both FMS1 on the Captain's ND and FMS2 on the FO's confirmed FMC operation. We asked ATC for direct down range and confirmed FMS accuracy using FD1 guidance of MCDU1 entered direct routing. I engaged the autopilot and autothrottles and we continued on course using LNAV/VNAV.We discussed the status of the aircraft and the conditions at our destination; ZZZ. We elected to continue to ZZZ where we completed the trip without incident. I submitted an electronic logbook entry and called Maintenance Control after arrival. Approximately 35 minutes into our hour-long flight; I realized we had not requested [the] planned climb above our initial cruise altitude; FL310; and that contingency fuel had been burned during a slower climb than normal. Burn; alternate; ZZZ1; and 45-minute FAA fuel was still available; though a missed approach would have compelled diversion to ZZZ1. The FD2 diagnosis and distraction lead to the initial loss of SA regarding erosion to our fuel state. Beginning descent and approach planning brought for our new fuel and prepared us for contingencies. Communication throughout was key to understanding the status of the aircraft and mitigated the initial startle and confusion at such a low altitude early flight stage.


Second narrative: We were cleared for takeoff by ZZZ3 Tower with instructions to turn to heading 360 and maintain 3;000 ft. The pilot flying which was me; the First Officer; put 360 in the MCP and deselected LNAV. We took off and as we were climbing through about 500 ft.; the command bars disappeared and altitude went to 50;000 on both the PFD and MCP. We leveled at 3;000 on heading 360. ATC gave us climb to 11;000 and direct to a fix. The Captain told him we needed a heading we were having trouble with the flight director. ATC gave us a head of 010 and climb to 11;000 ft.The heading bug on the First Officer's PFD and MFD was stuck on heading 360 but was 010 on the MCP and on the Captain's displays. The Captain checked the PFD heading with the compass and it matched. We had no flags on the PFD or MFD. The Captain turned off both flight directors and then turned them both back on with the First Officer's being the master. When he turned it back on; the altitude went back to 50;000 and we could not change it. The command bars never came back. We saw that the Captain had a flight director and that his heading bug would turn with the MCP. The Captain then turned the FDs off and put his FD as the master. When he did that; the altitude went back to normal. On the FO's (First Officer) displays there was still no FD and the heading bug was stuck on 360 but now the altitude was correct. We continued the flight to ZZZ with the Captain flying.


Synopsis: B737 flight crew reported that shortly after takeoff; the First Officer's flight director began malfunctioning; leading to the MCP and heading bug also being inoperative.