"How long can the us marshals have a detainer on you without filing actual charges?"
1 attorney answer
Generally you cannot be held in custody without some formal charges having been brought against you, or pending warrants outstanding, or a request by another court via habeas corpus to have you delivered to the requesting court. Without knowing all the details, it sounds like you were already in custody and taken out by the Marshals, pending transfer or production to another court.
Otherwise, upon your initial arrest you would have had to have been processed at a law enforcement facility and then transported to a jail to be detained, and then have an initial appearance relatively soon thereafter.
You should call your attorney on the underlying case.