.
                                                                               .
                                                                               .
                                                                    EXHIBIT 10.2

MACQUARIE BANK LIMITED
ABN 46 008 583 542

<Table>

                                                              
No. 1 Martin Place      Telephone (612)8232 3333                    Treasury 8232 3600 Facsimile 8232  Facsimile 8232 4227
Sydney NSW  2000        Facsimile (612)8232 6926                    Foreign Exchange 8232 3666 Facsimile 8232 3019
GPO Box 4294            Telex 122246                                Metals and Mining 8232 3444 Facsimile 8232 3590
Sydney NSW 1164         Internet http://www.macquarie.com.au        Futures 8232 3555 Facsimile 8232 9743
                        DX 10287 SSE                                Debt Markets 8232 8569 Facsimile 8232 8341
                        SWIFT MACQAU2S                              Agricultural Commodities 8232 7672 Facsimile 8232 3533
</Table>

27 July 2004

Petro Quest Energy, L.L.C.
Attn:  Michael O. Aldridge
400 E. Kaliste Saloom Rd.
Suite 6000
Lafayette, Louisiana 70508

        Re:  Second Amendment to the Second Lien Secured Credit Agreement dated
             as of November 6, 2003 (as amended, the "Credit Agreement")
             between PetroQuest Energy, L.L.C. ("PetroQuest"), and Macquarie
             Bank Limited (in its individual capacity and as Administrative
             Agent, "Macquarie"), as assignee of Macquarie Americas Corp.

Dear Mike:

         The purpose of this letter is to document the adjustment to the G & A
Expenses of the Borrower and the Guarantor. As such, the following modification
is made to the Credit Agreement:

         Section 7.14 General and Administrative Expenses Permit Borrower's and
         Guarantor's consolidated G&A Expenses to exceed

                  (a) for each of the three calendar quarters commencing April
         1, 2004, July 1, 2004 and October 1, 2004 the lesser of (i) three
         million two hundred and fifty thousand dollars ($3,250,000) or (ii)
         thirty-one percent (31%) of the Tax Adjusted Gross Margin; provided,
         however, if Borrower's and Guarantor's consolidated G&A Expenses for
         any quarter exceed 31% of the Tax Adjusted Gross Margin, the maximum
         allowable consolidated G&A Expenses for Borrower and Guarantor during
         the immediately succeeding quarter will be 18% of the Tax Adjusted
         Gross margin; and provided further that a breach of clause (ii) of this
         Section 7.14 can only form the basis of an Event of Default if
         Borrower's and Guarantor's consolidated G&A Expenses exceed (x) 31% of
         the Tax Adjusted Gross Margin during any quarter and (y) 18% of the Tax
         Adjusted Gross Margin during the immediately succeeding quarter and
         provided further that,

MACQUARIE BANK LIMITED                                                         2


         notwithstanding anything in this Section 7.14 to the contrary, the
         consolidated G&A Expenses of Borrower and Guarantor shall not exceed
         35% of the Tax Adjusted Gross Margin; and

                  (b) for each calendar quarter commencing January 1, 2005 the
         lesser of (i) three million dollars ($3,000,000) or (ii) thirty-one
         percent (31%) of the Tax Adjusted Gross Margin; provided, however, if
         Borrower's and Guarantor's consolidated G&A Expenses for any quarter
         exceed 31% of the Tax Adjusted Gross Margin, the maximum allowable
         consolidated G&A Expenses for Borrower and Guarantor during the
         immediately succeeding quarter will be 18% of the Tax Adjusted Gross
         margin; and provided further that a breach of clause (ii) of this
         Section 7.14 can only form the basis of an Event of Default if
         Borrower's and Guarantor's consolidated G&A Expenses exceed (x) 31% of
         the Tax Adjusted Gross Margin during any quarter and (y) 18% of the Tax
         Adjusted Gross Margin during the immediately succeeding quarter; and
         provided further that, notwithstanding anything in this Section 7.14 to
         the contrary, the consolidated G&A Expenses of Borrower and Guarantor
         shall not exceed 35% of the Tax Adjusted Gross Margin.

         Upon your acknowledgment of this letter, this modification will be
effective as of June 30, 2004. Except as expressly modified by the terms of this
letter, however, nothing in this letter will be construed as an amendment to or
waiver of any provision in the Credit Agreement or any of the other Loan
Documents.

         To confirm your agreement to modify the Credit Agreement as described
in this letter, please execute the enclosed copy of this letter in the space
provided and return a fully executed original for our files. If you have any
questions, please contact Paul Beck at (713) 986-3601.

Very truly yours,

MACQUARIE BANK LIMITED,
an Australian incorporated bank

By:  /s/ NICHOLAS O'KANE
   --------------------------
Name: NICHOLAS O'KANE
     ------------------------
Title: EXECUTIVE DIRECTOR
      -----------------------


By:  /s/ THOMAS CULLINAN
   --------------------------
Name: Thomas Cullinan
     ------------------------
Title: Attorney
      -----------------------


Agreed on this 27 day of July, 2004.

MACQUARIE BANK LIMITED                                                         3



PETROQUEST ENERGY, L.L.C.,
a Louisiana limited liability company

/s/ MICHAEL O. ALDRIDGE
- -----------------------
Michael O. Aldridge
Treasurer




Acknowledged this 27th day of July, 2004.

BANK ONE, N.A.
a national banking association


By: /s/ Jo LINDA PAPADAKIS
   -------------------------
Name: Jo Linda Papadakis
     -----------------------
Title: Associate Director
      ----------------------