Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Managed Codex ACP session recovery patch

The pinned `@openaide/codex-acp@1.2.1` adapter always supplies a provider when resuming or loading a session. Native Codex treats that as an explicit override and skips its persisted model/reasoning restoration. The adapter also rebuilds approval mode from its startup default. Native Codex 0.153.3 restores approval policy and reviewer but reloads the sandbox from current configuration, so forwarding its resume response alone can broaden an existing session's permissions.
The pinned `@openaide/codex-acp@1.2.2` adapter always supplies a provider when resuming or loading a session. Native Codex treats that as an explicit override and skips its persisted model/reasoning restoration. The adapter also rebuilds approval mode from its startup default. Native Codex 0.153.3 restores approval policy and reviewer but reloads the sandbox from current configuration, so forwarding its resume response alone can broaden an existing session's permissions.

`apply-session-recovery.mjs` changes these resume/load boundaries. The helper reads the latest policy from the native-owned history path before resume can append new settings. Explicit provider overrides remain effective. Recovered full policies appear as **Native session policy**, and subsequent prompts keep the native process's resolved permissions until the user explicitly chooses another preset. This avoids replacing granular rules with the legacy sandbox projection. New sessions and explicit preset changes keep their existing behavior. The patch does not replay OpenAIDE's stale option catalogs.

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "openaide-codex-acp-runtime",
"private": true,
"dependencies": {
"@openaide/codex-acp": "1.2.1"
"@openaide/codex-acp": "1.2.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"packageName": "@openaide/codex-acp",
"packageVersion": "1.2.1",
"runtimeId": "1.2.1-openaide.1",
"upstreamSha256": "4e53156b6d37ebe64cfdbdb0baffa41aa77264dec264d07cf1e2537a6354b46e",
"patchedSha256": "91c5d3897bc81c7621bdb8a350fabaa00e1eb9c3d8b04840bcee5884e97c727e",
"packageVersion": "1.2.2",
"runtimeId": "1.2.2-openaide.1",
"upstreamSha256": "c9072de196cca6e678f0020937ac30a66ab3ea7ad9e1e5767a935406c84a4c71",
"patchedSha256": "e09eeed16a94da507d4cc580a6f6fdb3906ff0872f7095a6b5c215194682076f",
"helperSha256": "6c6d28733318c53f8fb6d5079c0ea758c23fd5e83f0516b1de9b3660a1c1d7b1"
}
2 changes: 1 addition & 1 deletion openaide-rs/app-server/src/agent/acp_agent_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::protocol::host::HostBridge;
#[path = "acp_agent_config_tests.rs"]
mod tests;

const PRODUCT_CODEX_ACP_SPEC: &str = "@openaide/codex-acp@1.2.1";
const PRODUCT_CODEX_ACP_SPEC: &str = "@openaide/codex-acp@1.2.2";

#[derive(Debug, Clone)]
pub struct AcpAgentConfig {
Expand Down
6 changes: 3 additions & 3 deletions openaide-rs/app-server/src/agent/acp_agent_config_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn built_in_codex_uses_the_product_pinned_adapter() {

assert_eq!(config.agent_id, "codex");
assert_eq!(config.command, "npx");
assert_eq!(config.args, ["-y", "@openaide/codex-acp@1.2.1"]);
assert_eq!(config.args, ["-y", "@openaide/codex-acp@1.2.2"]);
assert!(config.env.is_empty());
assert_eq!(config.diagnostic_launcher_kind(), "managed_package");
}
Expand Down Expand Up @@ -74,7 +74,7 @@ fn windows_command_extensions_follow_pathext_and_ignore_unsupported_scripts() {
fn windows_batch_launcher_is_invoked_through_cmd_exe() {
let args = process_args(
r"C:\Program Files\nodejs\npx.cmd",
&["-y".to_string(), "@openaide/codex-acp@1.2.1".to_string()],
&["-y".to_string(), "@openaide/codex-acp@1.2.2".to_string()],
&[("AGENT_TOKEN".to_string(), "secret".to_string())],
true,
);
Expand All @@ -88,7 +88,7 @@ fn windows_batch_launcher_is_invoked_through_cmd_exe() {
"/C",
r"C:\Program Files\nodejs\npx.cmd",
"-y",
"@openaide/codex-acp@1.2.1",
"@openaide/codex-acp@1.2.2",
]
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl CodexAcpInstaller for RecordingInstaller {
fs::create_dir_all(package_root.join("dist")).expect("create managed package fixture");
fs::write(
package_root.join("package.json"),
r#"{"name":"@openaide/codex-acp","version":"1.2.1"}"#,
r#"{"name":"@openaide/codex-acp","version":"1.2.2"}"#,
)
.expect("write managed package manifest");
fs::write(package_root.join("dist/index.js"), INDEX_FIXTURE)
Expand Down Expand Up @@ -250,7 +250,7 @@ fn patched_runtime_uses_a_separate_cache_and_preserves_the_leased_upstream_runti
let launch = provisioner.prepare(AcpAgentConfig::codex()).unwrap();

assert!(std::path::Path::new(&launch.config.args[0])
.starts_with(runtime_root.join("1.2.1-openaide.1")));
.starts_with(runtime_root.join("1.2.2-openaide.1")));
assert_eq!(installer.destinations.lock().unwrap().len(), 1);
assert_eq!(
fs::read(upstream.join("node_modules/@openaide/codex-acp/dist/index.js")).unwrap(),
Expand Down
2 changes: 1 addition & 1 deletion openaide-rs/app-server/src/agent/registry_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,5 @@ fn registry_overlay_does_not_let_legacy_custom_records_replace_builtin_codex() {

assert_eq!(codex.source_kind, AgentSourceKind::BuiltIn);
assert_ne!(config.command, "codex-acp");
assert_eq!(config.args, ["-y", "@openaide/codex-acp@1.2.1"]);
assert_eq!(config.args, ["-y", "@openaide/codex-acp@1.2.2"]);
}