Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c722052
image: add shared data URL preparation utilities (#27245)
fjord-oai Jun 10, 2026
b39f943
[codex-analytics] emit internally started turn events (#27392)
marksteinbrick-oai Jun 10, 2026
ac9c534
[codex] Preserve build-script dependencies in rules_rs annotations (#…
anp-oai Jun 11, 2026
b389b95
core: cache turn diff rendering (#27489)
nornagon-openai Jun 11, 2026
1a9efd4
[codex] Remove redundant plugin app auth state (#27465)
xl-openai Jun 11, 2026
36fc79c
Remove TUI legacy core test_support dependencies (#27484)
etraut-openai Jun 11, 2026
9d87b77
Add session delete commands in CLI and TUI (#27476)
etraut-openai Jun 11, 2026
a6f435e
core: resize all history images behind a feature flag (#27247)
fjord-oai Jun 11, 2026
ab4ce40
Trim TUI legacy telemetry and migration dependencies (#27487)
etraut-openai Jun 11, 2026
658af93
[codex] Add token budget context feature (#27438)
pakrym-oai Jun 11, 2026
f1f9d0c
[codex] Expand hosted web search citation guidance (#27501)
yuning-oai Jun 11, 2026
728b824
tools: simplify default tool search text (#27526)
sayan-oai Jun 11, 2026
87ab018
[codex] Add new context window tool (#27488)
pakrym-oai Jun 11, 2026
06afd63
feat: add Bedrock API key as a managed auth mode (#27443)
celia-oai Jun 11, 2026
e614fad
[codex] Add comp_hash to model metadata (#27532)
aibrahim-oai Jun 11, 2026
4435ff2
core: strip image detail from Responses Lite requests (#27246)
fjord-oai Jun 11, 2026
8568559
[codex] Pass auth mode to plugin manager (#27517)
xl-openai Jun 11, 2026
ba4925b
[codex] Compact when comp_hash changes (#27520)
aibrahim-oai Jun 11, 2026
dac5f07
[codex] Add context remaining tool (#27518)
pakrym-oai Jun 11, 2026
5981251
image: preserve metadata when resizing prompt images (#27266)
fjord-oai Jun 11, 2026
ef7d9c2
Release 0.140.0-alpha.8
aibrahim-oai Jun 11, 2026
beedde9
Seed Termux release automation
github-actions[bot] Jun 11, 2026
f49b05b
Prepare Termux rust-v0.140.0-alpha.8
github-actions[bot] Jun 11, 2026
ff6b8d1
Merge pull request #210 from wallentx/upstream/rust-v0.140.0
wallentx Jun 11, 2026
3950f75
Merge commit 'ff6b8d1418fb3af7c54f51eaf72653e82f9c5023' into checkpoi…
github-actions[bot] Jun 11, 2026
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
6 changes: 6 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ single_version_override(
module_name = "rules_rs",
patch_strip = 1,
patches = [
"//patches:rules_rs_build_script_deps_annotation.patch",
"//patches:rules_rs_windows_gnullvm_exec.patch",
"//patches:rules_rs_windows_exec_linker.patch",
],
Expand Down Expand Up @@ -295,6 +296,11 @@ bazel_dep(name = "openssl", version = "3.5.4.bcr.0")
inject_repo(crate, "xz")

crate.annotation(
# Build scripts compile in Bazel's exec configuration, so target-specific
# optional build deps are otherwise dropped for the musl release platforms.
build_script_deps = [
"@crates//:openssl-src-300.5.5+3.5.5",
],
build_script_data = [
"@openssl//:gen_dir",
],
Expand Down
2 changes: 1 addition & 1 deletion codex-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.140.0-alpha.7"
version = "0.140.0-alpha.8"
# Track the edition for all workspace crates in one place. Individual
# crates can still override this value, but keeping it here means new
# crates created with `cargo new -w ...` automatically inherit the 2024
Expand Down
91 changes: 90 additions & 1 deletion codex-rs/analytics/src/analytics_client_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,33 @@ fn sample_initialize_fact(connection_id: u64) -> AnalyticsFact {
}
}

async fn ingest_complete_child_turn(
reducer: &mut AnalyticsReducer,
events: &mut Vec<TrackEventRequest>,
thread_id: &str,
turn_id: &str,
) {
for fact in [
AnalyticsFact::Custom(CustomAnalyticsFact::TurnResolvedConfig(Box::new(
sample_turn_resolved_config(thread_id, turn_id),
))),
AnalyticsFact::Custom(CustomAnalyticsFact::TurnProfile(Box::new(
TurnProfileFact {
turn_id: turn_id.to_string(),
profile: sample_turn_profile(),
},
))),
AnalyticsFact::Notification(Box::new(sample_turn_completed_notification(
thread_id,
turn_id,
AppServerTurnStatus::Completed,
/*codex_error_info*/ None,
))),
] {
reducer.ingest(fact, events).await;
}
}

fn sample_command_execution_item(
status: CommandExecutionStatus,
exit_code: Option<i32>,
Expand Down Expand Up @@ -2667,7 +2694,7 @@ async fn subagent_thread_started_publishes_without_initialize() {
}

#[tokio::test]
async fn subagent_thread_started_inherits_parent_connection_for_new_thread() {
async fn subagent_events_use_inherited_connection_unless_turn_connection_is_explicit() {
let mut reducer = AnalyticsReducer::default();
let mut events = Vec::new();
let parent_thread_id =
Expand Down Expand Up @@ -2774,6 +2801,68 @@ async fn subagent_thread_started_inherits_parent_connection_for_new_thread() {
payload[0]["event_params"]["parent_thread_id"],
"44444444-4444-4444-4444-444444444444"
);

events.clear();
ingest_complete_child_turn(&mut reducer, &mut events, "thread-review", "turn-inherited").await;
let [TrackEventRequest::TurnEvent(event)] = events.as_slice() else {
panic!("expected one turn event");
};
let params = &event.event_params;
assert_eq!(params.session_id, "session-root");
assert_eq!(params.thread_source, Some(ThreadSource::Subagent));
assert_eq!(params.subagent_source.as_deref(), Some("thread_spawn"));
assert_eq!(
params.parent_thread_id.as_deref(),
Some("44444444-4444-4444-4444-444444444444")
);
assert_eq!(params.app_server_client.product_client_id, "parent-client");
assert_eq!(params.runtime.codex_rs_version, "0.1.0");

reducer
.ingest(
AnalyticsFact::Custom(CustomAnalyticsFact::TurnTokenUsage(Box::new(
sample_turn_token_usage_fact("thread-review", "turn-inherited"),
))),
&mut events,
)
.await;
assert_eq!(events.len(), 1);

events.clear();
reducer
.ingest(sample_initialize_fact(/*connection_id*/ 8), &mut events)
.await;
reducer
.ingest(
AnalyticsFact::ClientRequest {
connection_id: 8,
request_id: RequestId::Integer(3),
request: Box::new(sample_turn_start_request(
"thread-review",
/*request_id*/ 3,
)),
},
&mut events,
)
.await;
reducer
.ingest(
AnalyticsFact::ClientResponse {
connection_id: 8,
request_id: RequestId::Integer(3),
response: Box::new(sample_turn_start_response("turn-explicit")),
},
&mut events,
)
.await;
ingest_complete_child_turn(&mut reducer, &mut events, "thread-review", "turn-explicit").await;
let [TrackEventRequest::TurnEvent(event)] = events.as_slice() else {
panic!("expected one turn event");
};
assert_eq!(
event.event_params.app_server_client.product_client_id,
DEFAULT_ORIGINATOR
);
}

#[tokio::test]
Expand Down
1 change: 1 addition & 0 deletions codex-rs/analytics/src/facts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ pub enum CompactionReason {
UserRequested,
ContextLimit,
ModelDownshift,
CompHashChanged,
}

#[derive(Clone, Copy, Debug, Serialize)]
Expand Down
12 changes: 9 additions & 3 deletions codex-rs/analytics/src/reducer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1497,17 +1497,23 @@ impl AnalyticsReducer {
let Some(thread_id) = turn_state.thread_id.as_ref() else {
return;
};
let Some(connection_id) = turn_state.connection_id else {
let drop_site = AnalyticsDropSite::turn(thread_id, turn_id);
let connection_id = turn_state.connection_id.or_else(|| {
self.threads
.get(drop_site.thread_id)
.and_then(|thread| thread.connection_id)
});
let Some(connection_id) = connection_id else {
warn_missing_analytics_context(&drop_site, MissingAnalyticsContext::ThreadConnection);
return;
};
let Some(connection_state) = self.connections.get(&connection_id) else {
warn_missing_analytics_context(
&AnalyticsDropSite::turn(thread_id, turn_id),
&drop_site,
MissingAnalyticsContext::Connection { connection_id },
);
return;
};
let drop_site = AnalyticsDropSite::turn(thread_id, turn_id);
let Some(thread_metadata) = self
.threads
.get(drop_site.thread_id)
Expand Down
34 changes: 22 additions & 12 deletions codex-rs/app-server-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use std::fmt;
use std::io::Error as IoError;
use std::io::ErrorKind;
use std::io::Result as IoResult;
use std::path::Path;
use std::sync::Arc;
use std::time::Duration;

Expand All @@ -48,7 +49,11 @@ use codex_config::LoaderOverrides;
use codex_config::NoopThreadConfigLoader;
use codex_config::RemoteThreadConfigLoader;
use codex_config::ThreadConfigLoader;
use codex_config::config_toml::ConfigToml;
use codex_core::config::Config;
pub use codex_core::otel_init::build_provider as build_otel_provider;
use codex_core::personality_migration::PersonalityMigrationStatus;
use codex_core::personality_migration::maybe_migrate_personality;
pub use codex_exec_server::EnvironmentManager;
pub use codex_exec_server::ExecServerRuntimePaths;
use codex_feedback::CodexFeedback;
Expand Down Expand Up @@ -82,25 +87,30 @@ pub mod legacy_core {
}
}

pub mod otel_init {
pub use codex_core::otel_init::*;
}

pub mod personality_migration {
pub use codex_core::personality_migration::*;
}

pub mod test_support {
pub use codex_core::test_support::*;
}

pub mod windows_sandbox {
pub use codex_core::windows_sandbox::*;
}
}

const SHUTDOWN_TIMEOUT: Duration = Duration::from_secs(5);

/// Runs the embedded app-server personality migration.
///
/// Returns `true` when the migration changed config and the caller should reload it.
pub async fn migrate_personality_if_needed(
codex_home: &Path,
config_toml: &ConfigToml,
state_db: Option<StateDbHandle>,
) -> IoResult<bool> {
let status = maybe_migrate_personality(codex_home, config_toml, state_db).await?;
match status {
PersonalityMigrationStatus::Applied => Ok(true),
PersonalityMigrationStatus::SkippedMarker
| PersonalityMigrationStatus::SkippedExplicitPersonality
| PersonalityMigrationStatus::SkippedNoSessions => Ok(false),
}
}

/// Raw app-server request result for typed in-process requests.
///
/// Even on the in-process path, successful responses still travel back through
Expand Down

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

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

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

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

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

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

2 changes: 1 addition & 1 deletion codex-rs/app-server-protocol/schema/typescript/AuthMode.ts

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

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

7 changes: 6 additions & 1 deletion codex-rs/app-server-protocol/src/protocol/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,19 @@ pub enum AuthMode {
#[ts(rename = "personalAccessToken")]
#[strum(serialize = "personalAccessToken")]
PersonalAccessToken,
/// Amazon Bedrock bearer token managed by Codex.
#[serde(rename = "bedrockApiKey")]
#[ts(rename = "bedrockApiKey")]
#[strum(serialize = "bedrockApiKey")]
BedrockApiKey,
}

impl AuthMode {
/// Returns whether this mode represents an authenticated human ChatGPT account.
pub fn has_chatgpt_account(self) -> bool {
match self {
Self::Chatgpt | Self::ChatgptAuthTokens | Self::PersonalAccessToken => true,
Self::ApiKey | Self::AgentIdentity => false,
Self::ApiKey | Self::AgentIdentity | Self::BedrockApiKey => false,
}
}
}
Expand Down
Loading