With reported speech, backshifting (shifting the speech into the past) is optional. This means for instance that a statement reported in past perfect could represent a statement originally made in the past perfect, simple past, or present perfect. We only know which is it because of context clues. This means sometimes we don't know what tense the original statement had.
In the first example, because of the time relation between the two clauses ("until"), we know exactly when they happened relative to each other, so both sentences mean exactly the same thing regardless of the tenses used in the original statement. The past perfect in the second version is unnecessary and sounds redundant.
In the second example, there's no clues from the context what the original tense was, and there's reported speech within reported speech, so there are many possible meanings here, which may or may not mean the same thing.
The first version could mean:
She asked me, "Why haven't you asked me if I agree to do it?"
She asked me, "Why haven't you asked me if I agreed to do it?"
She asked me, "Why didn't you ask me if I agree to do it?"
...
And so on. I figure there's six possible meanings of the first version, and nine possible meanings of the second version. Some of these are the same, so in the right context, they might mean the same thing.