In the IDF it didn't happen. So far, all the Chiefs of Staff were on active duty when they were appointed. The appointment of a retired officer did happen in the Israeli police, When Yehuda Vilk was appointed as the General Commissioner in 1998, and came back from retirement that lasted 4 years.
Although former Chiefs of Staff were on active duty when appointed, It is worth mentioning that some of them retired from service as junior officers or even as regular troops and kater returned to active duty. The former Chief Of Staff Moshe Ya'alon is an example. He was released from the army at the rank of staff sergeant in 1971, returned to service as reserved soldier on 1973, during the Yom-Kipur war, and only then completed his officer's training.
The current Chief of Staff, Dan Halutz (and another link, in English), is also an example: He retired from active duty in 1973, at the rank of major. During the Yom-Kipur war he served on reserve duty, and later on returned to active duty. He retired again in 1978, But returned to active duty in 1982, during the first Lebanon war.