The two parties have been in contract talks since McFadden joined the Black Cats on trial last month, and O'Neill has revealed that a verbal agreement is in place to have the Scot sign on until January.
The 29-year-old has been steadily improving his fitness and O'Neill believes that the reward of first-team football could push him to work even harder on his conditioning.
"Over the last week or so I've been in contact with his agent. We have in principle agreed something which would suit us all. That would be a contract for a couple of months," said O'Neill.
"I still feel James is a bit short of what I would consider real proper fitness. And I'm delighted to say, he's not one of those lads who would not want to hang around if he couldn't make progress.
"It's an arrangement that we still need to verify, but it might suit us all. It provides an incentive for James to get into the side over the next couple of months."
McFadden has been without a club since he was released by Everton at the end of last season.