user12255: A main line in the King's Indian Defense is this 1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 d6. However,  black could castle instead of d6:
[FEN " "]
1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 O-O

Is this a more-or-less inconsequential move order inversion or does white need to be careful to avoid some pitfall?  
Specifically, in the usual mainline I would play the Sämisch Variation (5. f3) and it does not feel quite right to play f3 there right away, but maybe it is? If not, what should one do as a Sämisch player, Be3 right away? 
Or, is this 4. ... O-O an error that white can try to exploit? If so, I assume the refutation ought to be 5. e5. But is this is good idea? 
I am most interested in answers geared towards Class A or B players, but will be grateful for any input.  

user4588: In the vast majority of the cases, 4....d6 and 4....0-0 transpose into each other.
However, with 4....0-0 black keeps the option of playing c6 and d5. Recently, this idea has been played by GM Jobava, known for his original approach in the opening: Lupulescu-Jobava, So-Jobava and Vitiugov-Jobava.
About the last game, chess.com comments "Just giving away the g6-pawn. This reporter is at a loss". The engines do not approve Jobava's opening, but somehow he was able to create enough counterplay and to draw the game.
As you play the Sämisch, it makes sense to start with 5.Be3, as Ng4 is not possible. Clearly, 5....d6 6.f3 would transpose to your repertoire. After 5....c6, white has two popular ways to seize the initiative and to obtain an advantage: 6.e5 Ne8 7.f4 d6 8.Nf3 (e.g. Parligras-Fier) and 6.f3 d5 7.cxd5 cxd5 8.e5 Ne8 9.h4 (as in Vitiugov-Jobava). The former should result in a slight but stable advantage for white, while the latter leads to sharper play.


      [StartPly "7"]

      [FEN ""]
      1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 O-O (4...d6) 5.Be3 (5.f3) c6 (5...d6 6.f3) 6.f3 (6.e5 Ne8 7.f4 d6 8.Nf3) d5 7.cxd5 cxd5 8.e5 Ne8 9.h4




12255: <p>A main line in the King's Indian Defense is this 1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 d6. However,  black could castle instead of d6:</p>

<pre><code>[FEN " "]
1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 O-O
</code></pre>

<p>Is this a more-or-less inconsequential move order inversion or does white need to be careful to avoid some pitfall?  </p>

<p>Specifically, in the usual mainline I would play the Sämisch Variation (5. f3) and it does not feel quite right to play f3 there right away, but maybe it is? If not, what should one do as a Sämisch player, Be3 right away? </p>

<p>Or, is this 4. ... O-O an error that white can try to exploit? If so, I assume the refutation ought to be 5. e5. But is this is good idea? </p>

<p>I am most interested in answers geared towards Class A or B players, but will be grateful for any input.  </p>
 4588: <p>In the vast majority of the cases, 4....d6 and 4....0-0 transpose into each other.</p>

<p>However, with 4....0-0 black keeps the option of playing c6 and d5. Recently, this idea has been played by GM Jobava, known for his original approach in the opening: <a href="http://www.chessgames.com/perl/chessgame?gid=1867294" rel="noreferrer">Lupulescu-Jobava</a>, <a href="http://www.chessgames.com/perl/chessgame?gid=1879649" rel="noreferrer">So-Jobava</a> and <a href="http://www.chessgames.com/perl/chessgame?gid=1882674" rel="noreferrer">Vitiugov-Jobava</a>.</p>

<p>About the last game, <a href="https://www.chess.com/news/view/jobava-dazzles-in-denmark-5446" rel="noreferrer">chess.com</a> comments "Just giving away the g6-pawn. This reporter is at a loss". The engines do not approve Jobava's opening, but somehow he was able to create enough counterplay and to draw the game.</p>

<p>As you play the Sämisch, it makes sense to start with 5.Be3, as Ng4 is not possible. Clearly, 5....d6 6.f3 would transpose to your repertoire. After 5....c6, white has two popular ways to seize the initiative and to obtain an advantage: 6.e5 Ne8 7.f4 d6 8.Nf3 (e.g. <a href="https://chess-db.com/public/game.jsp?id=Parligras,%20Mircea-Emilian.2107139.174199296.28343" rel="noreferrer">Parligras-Fier</a>) and 6.f3 d5 7.cxd5 cxd5 8.e5 Ne8 9.h4 (as in Vitiugov-Jobava). The former should result in a slight but stable advantage for white, while the latter leads to sharper play.</p>

<pre>
<code>
      [StartPly "7"]

      [FEN ""]
      1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 O-O (4...d6) 5.Be3 (5.f3) c6 (5...d6 6.f3) 6.f3 (6.e5 Ne8 7.f4 d6 8.Nf3) d5 7.cxd5 cxd5 8.e5 Ne8 9.h4

</code>
</pre>
