Caster Level Looping
I'm going to open this answer by saying - there is no definitive rules text on how to treat, or in what order, stacking caster levels from classes or prestige classes. There is a general rule from the 3.5e FAQ that states that 'in general' one should apply bonuses in order most beneficial to the creature, but it's not exactly specific, or definitive, especially in this edge case.
Also, Caster Level Looping And You (by Bauglir) has how the CO people think all this works, also, nearly every way to multiplicatively increase Caster Level in the game.
It's worth noting that there are two ways to read this. One (the one CO likes) is that 'spellcaster level' is referring to 'caster level', and indeed, this is actually the way the game parses it in other abilities. But it could also be referring to 'levels in spellcasting classes', which means basically NONE of the shenanigans outlined here will do anything.
In my answer, I will be assuming the former, due to the way the question is asked. In the case of the latter, simply count up your class levels in arcane casting classes (which doesn't include PrC's that say '+1 level in existing blah', tough luck), and that's your CL for everything.
It's worth noting that former reading is not suitable for play or practical optimization in any sense. Neither are any of the other caster level loops, even (or especially) the ones that are written more explicitly.
But on to the questions.
Alex is a Spellthief 2 / Wizard 16 / Green Star Adept 2 who possesses the feat Master Spellthief. What's Alex's caster level for his wizard spells?
Alex's Master Spellthief feat means his Spellthief CL is 18 (16 Wizard + 2 Spellthief) and his Wizard CL is 18 (''), before he takes any levels of Green Star Adept, 'when determining caster level for arcane spells'. So for arcane spells it's 18, otherwise it's the normal numbers - 2 for spellthief, 16 for wizard. This is fine, as the numeric effects of Arcane Spells is kind of what you want to use a caster level for as an arcane caster. But it's important to note that his caster level is still just 2, and 16, not 18.
So when he takes Green Star Adept, he adds his Green Star Adept levels (2) to his Wizard levels (16) to get his new Wizard 'effective caster level' (18). So he now has three things related to being a Wizard;
His Actual Wizard Caster Level: 16
His 'Effective' Wizard Caster Level: 18
His Wizard Caster Level For the Purposes of Casting Arcane Spells: 20.
There's no reason why 'effective caster level' would not be counted as a caster level for the purposes of Master Spellthief, so 2 + 18 = 20 = what you use as your CL for arcane spells cast either from the Spellthief class or the Wizard class.
Additionally, the Wizard has the spells known and per day of a 17th level Wizard, due to Green Star Adept's Spells per Day/Spells Known class feature.
Bob is a Spellthief 4 / Wizard 15 / Knight of the Weave 1 who possesses the feat Master Spellthief. What's Bob's caster level for his A) spellthief spells, B) wizard spells, and C) knight of the weave spells?
And here starteth le fromage. Basically, Knight of the Weave's caster level is equal to Bob's Spellthief AND Wizard caster levels added together, but again NOT the Master Spellthief total, which is purely for the purposes of casting arcane spells only. So 4 + 15 = Knight of the Weave Caster Level of 19.
But whenever Bob casts an arcane spell, Master Spellthief kicks in. And it goes 'hmm what caster levels you got', finds Spellthief at 4, Wizard at 15, and some wacky prestige class called Knight of the Weave at 19, and then adds all those numbers together because they are all 'arcane spellcaster levels' and comes out with the absurd number of caster level of 38 for the purposes of casting arcane spells.
Chris is a Bard 1 / Spellthief 1 / Wizard 8 / Sublime Chord 10 who possesses the feat Master Spellthief. She applies the sublime chord class feature spells per day to her wizard casting. What's Chris's caster level for A) wizard spells and B) sublime chord spells?
Sublime Chord sets all arcane casting classes Caster Level to 18, in this scenario, due to the wording of it's 'spells per day' ability.
Then along comes our good friend Master Spellthief, sees 4 Caster Levels (Bard, Spellthief, Wizard, Sublime Chord) set at 18. It goes, you know what? Let's add all those together, and end up with a CL for the purposes of casting Arcane Spells of 72.
Then everyone cries.
Dylan is a Sorcerer 1 / Spellthief 4 / Wizard 3 / Ultimate Magus 10 who possesses the feat Master Spellthief. He applies the ultimate magus class feature spellcasting and extraordinary ability arcane spell power to his wizard casting when he can and his sorcerer casting when he must. What's Dylan's caster level for his A) wizard spells and B) sorcerer spells?
He starts out with Sorc CL 10, Spellthief CL 4, Wizard CL 11. He possesses a +4 to CL for the purposes of arcane spells. Master Spellthief turns his CL for all his arcane casting classes for the purposes of casting arcane spells into 25 (4+11+10). To which you then add +4. Master Spellthief (under the nice reading) sums the totals of your caster levels, not the totals of your 'caster level for the purposes of arcane spells', so UM's ability simply adds, it doesn't get multiplied across.
Ethan is a Bard 1 / Sorcerer 1 / Spellthief 2/ Wizard 3 / Green Star Adept 2 / Knight of the Weave 1 / Sublime Chord 6 / Ultimate Magus 4 (or another more favorable combination you choose) with the feat Master Spellthief. He applies everything he can to his wizard casting until he can apply it to his sublime chord casting and everything he must to his wizard casting or his sorcerer casting, favoring wizard. What are his caster levels for his A) bard spells, B) sorcerer spells, C) wizard spells, D) knight of the weave spells, and E) sublime chord spells?
Why are you doing this to me.
Right. Following the FAQ guideline about adding things in most beneficial order, this is actually relatively simple. Ultimate Magus advances Sublime Chord 2 steps (you'd be better off just taking more wizard levels, you only care about highest non-sublime-chord CL when sublime chord is in the mix, and dipping as many other arcane casting classes as possible), putting total 'sublime chord levels' at 8. Sublime Chord adds itself to Wizard to determine your CL for ALL arcane spellcasting clsases, so all your arcane spellcasting classes now have a CL of 3+8=11. Green Star Adept adds +2 to Sublime Chord on top, so you end up with a CL of 13 on all your arcane casting classes.
Knight of the Weave now does it's thing. You can't have it do it's thing 'first' and then add sublime chord to it and then have everything be CL 22 or something because Sublime Chord adds itself to 'level in a spellcasting class', not 'CL'. So '+1 existing level' prestige classes etc mean nothing to Sublime Chord unless they are advancing Sublime Chord, since it determines it's CL based on class levels in another class + Sublime Chord levels/prestige class bonuses/stuff. Anyway, you've got 5 caster levels (Bard, Sorcerer, Wizard, Spellthief, Sublime Chord) and Sublime has set them all to 13. So, 5x13=65, +1 for your Knight of the Weave level, gives a Knight of the Weave CL of 66.
Master Spellthief then does it's thing when you go to cast a spell, as normal. 66+65= CL 131.
Then Ultimate Magus does it's Arcane Power thing for +2 more, giving you a final total of
Important Concepts for Understanding This Stuff
Prestige classes that advance spellcasting do not themselves have a 'caster level' - they simply modify the caster level and spells known etc of another class.
'Caster level' is not the same as 'caster level for the purposes of arcane spells', it's like 'hp while raging' or 'hp while buffed with Aid' is not the same as 'base hp'.
Sublime Chord finds a base class, adds that base class' class levels to Sublime Chord levels, adds any randumb CL modifiers (Orange Ioun Stone, Green Star Adept) then sets every arcane CL the character has to that number, including it's own. It's not adding or involving CLs at all, just class level + class level + magic items or spells or whatever. Prestige classes that say '+1 spellcaster level' that apply to sublime chord count, but not those that apply to the class it is adding to itself.
Knight of the Weave doesn't do any of that, it just finds all the CLs around, adds them together, and uses that as it's own CL.
Master Spellthief doesn't ever modify any CLs. It just adds all existing CLs together to get a number used AS the CL for casting arcane spells. It doesn't actually change the actual CLs the classes have, just the number you use to cast spells.
'Effective caster level' is mostly the same as 'caster level' since you use it for anything involving caster level.
You do all of these transformations only once, in whatever order you like, but you can't just have them feeding back into each other forever due to the way they're written.
If one of these guys with Sublime Chord or Knight of the Weave picked up an Orange Ioun Stone, it would increment all their numbers and therefore change Sublime Chord's CL or Knight of the Weave's CL. You'd go back to the start and apply all the bonuses again, but this time including the Orange Ioun Stone, in whatever order was most advantageous to you as normal. So you'd undo the transformations and go from the top, work it all out again but with the new factor. Same if you gain a level, etc.
20th-level cleric spellcasting is optimal
You may not want 20 levels of the cleric base class. You absolutely want to cast as a 20th-level cleric does, however. That means no other base classes, and only prestige classes that offer “+1 level of existing (divine) spellcasting class” at every level that you take.
Aside from spellcasting, cleric level only affects your ability to Turn or Rebuke Undead, and potentially the power of domain granted abilities. If you pick domains that don’t care and aren’t interested in controlling an army of undead with Rebuke, those don’t matter much to you.
But even if those aren’t important to you, cleric spellcasting is so good that it’s (much) better to just keep taking cleric levels than it is to miss out on cleric spellcasting. For example, in core, you probably want Cleric 20 just because your options for prestige classes are fairly lackluster (loremaster does advance your spellcasting, but the entry requirements are very steep).
So there’s no solid level for when cleric as a class stops being a good choice. It is always a very good choice. It is possible that some prestige classes are better choices for you, but that depends on your feats and skills.
For a good run-down of what prestige classes are available to you, there’s a handbook for that. Probably also worth taking a look at the general cleric handbook as well.
A single level of cleric works surprisingly well
There are a lot of characters that you wouldn’t expect to want a level in cleric, who actually benefit from it dramatically. Even with insufficient Wisdom to actually cast any cleric spells, the domain granted abilities and the fuel for Divine feats are both exceedingly valuable, plus you can swap a domain for the corresponding Devotion feat (Complete Champion), for things like the excellent Travel Devotion (move-as-a-swift-action for the next minute, once per day plus once more for every two uses of Turn/Rebuke you burn on it). Cleric is thus probably the best single-level dip in the entire game, and there is actually an entire handbook devoted to just a single level of the class.
The biggest problem with your build is not Cleric 9, but rather Fighter 1. By level 10 you shouldn’t need a feat that badly, nor does its full BAB matter overly much at that particular level. Bone knight certainly requires neither. Thus, Cleric 10/Bone Knight 10 is better. There may be even-better options to replace some of those cleric levels, though.