WASHINGTON — After months of negotiations, former special counsel Robert Mueller has agreed to testify before the House Intelligence and Judiciary committees on July 17, but his willingness still comes with some parameters, according to a congressional aide with knowledge of the arrangement with Mueller’s office.

There will be two open sessions with Mueller and two closed sessions with his staff.

The House Judiciary Committee will have to choose which of its members are able to ask Mueller questions during its open session. Unlike the House Permanent Select Committee on Intelligence, the Judiciary Committee is quite large, almost double in size, so only 22 of its 41 members will be able to ask questions during the open session, the aide said.

The details of the agreement between the committees and Mueller’s office are still being worked out, a second congressional aide said, and could still change.

Judiciary Committee members who do not get to ask questions of Mueller will still be able to attend a closed session with Mueller’s staff following the open testimony, where they will be able to ask about material that was redacted from the public eye.

Each member of the Intelligence Committee will be able to ask Mueller questions for five minutes in the open session before following up in a similar closed session.

In the closed sessions, the Intelligence Committee will have access to the unredacted version of volume I of the Mueller report, which focuses on the question of collusion and conspiracy with the Russian government, while the Judiciary Committee will have access to the unredacted version of volume II, which focuses on obstruction of justice.

Neither committee will have access to any information that is redacted for purposes of protecting information provided to the grand jury.

There will be no transcript of the closed session of the House Intelligence Committee, but there will likely be a transcript of the session with the House Judiciary Committee.

The first congressional aide said members of both committees will not be restricted in what they can ask Mueller, but they do expect he will largely stick to the information he provided in the report.

The committees did not immediately respond to requests for comment.