There's nothing illegal about asking questions. It depends if they physically grabbed him at that point or not. That's assault. This part of Hamby's story that Myers claimed Hamby told him in a 1997 interview doesn't make much sense. Who were these "plainclothesman"? And if they were DPD, then why did the DPD later order Hamby back outside, throw him against a wall and frisk him? Did he somehow become more "suspicious" after entering the library?
Actually, it was his sprinting across the lawn before he entered the library. Here is more from Myers’ book:
“Poe gave Walker the suspect’s description. Poe’s partner, Leonard E. Jez, had been stranded at Tenth and Patton ever since Sergeant Hill had commandeered their squad car. Officer Jez asked Walker if he could ride with him. The patrolman agreed, and Jez climbed into Walker’s squad car—the newsman riding shotgun. The three started eastbound on Tenth, then south on Denver.
Just as Patrolman C.T. Walker completed the turn something caught his eye. “I saw a white male running east across the lawn of the library,” Walker told authorities. “I was still about three-fourths of a block from Jefferson, and he was even south of Jefferson—over a block from me. I put out a broadcast on the air that there was a person fitting the description running in the front of the library.”
.
.
.
They spotted a side entrance to the library basement. The officers drew their weapons in anticipation of checking it out. Just inside the door, young Adrian Hamby was getting curious. “I had gone to the basement door, which was about three steps below ground level, to look out the door,” Hamby said. “And when I did, there was about twenty or thirty police officers out there with rifles, pistols—you name it—and they were pointing it at me and told me to come out with my hands up. And I got scared and closed the door.”
.
.
.
Detective Marvin A. Buhk, one of the many officers who had responded to the call for help at the library, recalled a “Secret Service man” straightening out the mess Hamby found himself in. In a later report, Detective Buhk wrote, “One of the Secret Service men stated the person who came out of the basement with the others was not the suspect and that he had already talked to him a few minutes previously.”
So it was a couple of suspicious actions by Hamby that caused the police to react the way they did. And a lack of communication from whoever was in plainclothes.