Legally and ethically (in the United States), an attorney is required to have the consent of his client to change a plea. If that happened in open court, the plea would not have been accepted.
The pertinent part of Rule of Professional Conduct 1.2(a) which is essentially identical in ever U.S. state, states:
"A lawyer shall abide by a client's decision whether to settle a matter. In a criminal case, the lawyer shall abide by the client's decision, after consultation with the lawyer, as to a plea to be entered, whether to waive jury trial and whether the client will testify."
There is also constitutional criminal procedure case law to that effect, although as a lawyer who practices exclusively in civil matters, it doesn't come as quickly to mind.
Now, Al Capone's plea bargain took place on June 16, 1931. The pertinent ethical rules and constitutional criminal procedure cases may not have been in place at that time, and I certainly don't know the state of the law back then well enough to opine confidently upon it. Wikipedia recounts what happened (numerous citations omitted):
The IRS special investigation unit chose Frank J. Wilson to
investigate Capone, with the focus on his spending. The key to
Capone's conviction on tax charges was proving his income, and the
most valuable evidence in that regard originated in his offer to pay
tax. Ralph, his brother and a gangster in his own right, was tried for
tax evasion in 1930. Ralph spent the next three years in prison after
being convicted in a two-week trial over which Wilkerson presided.
Capone ordered his lawyer to regularize his tax position. Crucially,
during the ultimately abortive negotiations that followed, his lawyer
stated the income that Capone was willing to pay tax on for various
years, admitting income of $100,000 for 1928 and 1929, for instance.
Hence, without any investigation, the government had been given a
letter from a lawyer acting for Capone conceding his large taxable
income for certain years. On March 13, 1931, Capone was charged with
income tax evasion for 1924, in a secret grand jury. On June 5, 1931,
Capone was indicted by a federal grand jury on 22 counts of income tax
evasion from 1925 through 1929; he was released on $50,000 bail. A
week later, Eliot Ness and his team of Untouchables inflicted major
financial damage on Capone's operations and led to his indictment on
5,000 violations of the Volstead Act (Prohibition laws).
On June 16, 1931, at the Chicago Federal Building in the courtroom of
Judge James Herbert Wilkerson, Capone plead guilty to income tax
evasion and the 5,000 Volstead Act violations as part of a 2 1⁄2-year
prison sentence plea bargain. However, on July 30, 1931, Judge
Wilkerson refused to honor the plea bargain, and Capone's counsel
rescinded the guilty pleas. On the second day of the trial, Judge
Wilkerson overruled objections that a lawyer could not confess for his
client, saying that anyone making a statement to the government did so
at his own risk. Wilkerson deemed that the 1930 letter to federal
authorities could be admitted into evidence from a lawyer acting for
Capone. Wilkerson later tried Capone only on the income tax evasion
charges as he determined they took precedence over the Volstead Act
charges.
Much was later made of other evidence, such as witnesses and ledgers,
but these strongly implied Capone's control rather than stating it.
Capone's lawyers, who had relied on the plea bargain Judge Wilkerson
refused to honor and therefore had mere hours to prepare for the
trial, ran a weak defense focused on claiming that essentially all his
income was lost to gambling. This would have been irrelevant
regardless, since gambling losses can only be subtracted from gambling
winnings, but it was further undercut by Capone's expenses, which were
well beyond what his claimed income could support; Judge Wilkerson
allowed Capone's spending to be presented at very great length. The
government charged Capone with evasion of $215,000 in taxes on a total
income of $1,038,654, during the five-year period. Capone was
convicted on three counts of income tax evasion on October 17, 1931,
and was sentenced a week later to 11 years in federal prison, fined
$50,000 plus $7,692 for court costs, and was held liable for $215,000
plus interest due on his back taxes. The contempt of court sentence
was served concurrently. New lawyers hired to represent Capone were
Washington-based tax experts. They filed a writ of habeas corpus based
on a Supreme Court ruling that tax evasion was not fraud, which
apparently meant that Capone had been convicted on charges relating to
years that were actually outside the time limit for prosecution.
However, a judge interpreted the law so that the time that Capone had
spent in Miami was subtracted from the age of the offences, thereby
denying the appeal of both Capone's conviction and sentence.