A.J. Cook, Joe Mantegna A.J. Cook, Joe Mantegna

It wasn't hard for the writers of Criminal Minds to find inspiration for the show's Season 6 finale.

It's been a year of surprising cast shakeups and general uncertainty for the show, and Wednesday's finale (9/8c, CBS) speaks to that. "The writers cleverly decided to let the cliff-hanger aspects of the BAU team mirror what's going on with [us]," star Joe Mantegna tells TVGuide.com. "The uncertainties and decisions and problems and solutions directly mirror what's happening in real life."

Finale Preview: Get scoop on 39 season-enders

"It's about our team and the financial cost of crime-fighting," executive producer Erica Messer adds. "Bad guys seem to have endless funds but, as in real life, there are budget cuts in the government and the team is in jeopardy of being split up."

Budget cuts forced the show to write out series veteran A.J. Cook early in the season. Her character, Jennifer "JJ" Jareau, returned for one episode when fellow cast member Paget Brewster filmed her character's swan song. However, Cook has now signed a deal to return full time next season, and will be reintroduced in the finale. (Brewster, who shot a pilot that NBC has passed on, has an option to return if she chooses.)

The actors' real emotions played out on-screen when Cook left the show, and Mantegna says the same is true of her return. "It was one of those things where none of us quite understood why it happened in the first place," he says. "If you don't own the ball park, you can't make the decisions as to what goes on inside it. But now, the bottom line is we're all thrilled. She was always an integral part of the show. ... Hopefully this will re-energize us in a lot of ways."

A.J. Cook to return to Criminal Minds

Shemar Moore re-ups Criminal Minds deal