{"record":{"id":"d21c1ee20e084bdc","repo":"openai/codex","slug":"failed-to-initialize-in-process-app-server-client","errorCode":null,"errorMessage":"failed to initialize in-process app-server client: {err}","messagePattern":"failed to initialize in-process app-server client: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/exec/src/lib.rs","lineNumber":815,"sourceCode":"            )\n        }\n    };\n\n    // When --yolo (dangerously_bypass_approvals_and_sandbox) is set, also skip the git repo check\n    // since the user is explicitly running in an externally sandboxed environment.\n    if !skip_git_repo_check\n        && !dangerously_bypass_approvals_and_sandbox\n        && get_git_repo_root(&default_cwd).is_none()\n    {\n        eprintln!(\"Not inside a trusted directory and --skip-git-repo-check was not specified.\");\n        std::process::exit(1);\n    }\n\n    let mut request_ids = RequestIdSequencer::new();\n    let mut client = InProcessAppServerClient::start(in_process_start_args)\n        .await\n        .map_err(|err| {\n            anyhow::anyhow!(\"failed to initialize in-process app-server client: {err}\")\n        })?;\n\n    // Resolve resume and fork through existing app-server thread lifecycle APIs.\n    let (primary_thread_id, fallback_session_configured) = if let Some(ExecCommand::Resume(args)) =\n        command.as_ref()\n    {\n        if let Some(thread_id) =\n            resolve_resume_thread_id(&client, &config, state_db.as_ref(), args).await?\n        {\n            let response: ThreadResumeResponse = send_request_with_response(\n                &client,\n                ClientRequest::ThreadResume {\n                    request_id: request_ids.next(),\n                    params: thread_resume_params_from_config(\n                        &config,\n                        thread_id,\n                        resume_approvals_reviewer_override,\n                    ),","sourceCodeStart":797,"sourceCodeEnd":833,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/exec/src/lib.rs#L797-L833","documentation":"Error \"failed to initialize in-process app-server client: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/exec/src/lib.rs:815 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Investigate the in-process app-server client initialization error."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}