Andrew Stanton started writing the screenplay when he was in the middle of post-production of A Bug's Life (1998).