Codex harness: inject GitHub token so sandboxed git/gh can authenticate (v0.1.50) (#53)

* Codex harness: inject GitHub token so sandboxed git/gh can authenticate

Codex's workspace-write Seatbelt sandbox blocks the macOS keyring, so gh
inside the runner reports its stored token invalid and git's credential
helper can't authenticate — private-repo fetch/push fail even with the
network access granted in #51. Resolve the token in the parent process
(GITHUB_TOKEN env, synced env, gh auth token) and pass it to the codex
child as GH_TOKEN/GITHUB_TOKEN, which gh and its credential helper
prefer over the keyring.

* Bump version to 0.1.50
This commit is contained in:
Daniel Kim
2026-07-12 17:36:18 -07:00
committed by GitHub
parent df7c4330b1
commit 55692ef239
3 changed files with 9 additions and 2 deletions
Generated
+1 -1
View File
@@ -928,7 +928,7 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
[[package]]
name = "openresearch-cli"
version = "0.1.49"
version = "0.1.50"
dependencies = [
"anyhow",
"async-trait",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "openresearch-cli"
version = "0.1.49"
version = "0.1.50"
edition = "2021"
description = "OpenResearch CLI (orx) — Rust port"
repository = "https://github.com/alphaXiv/openresearch-cli"
+7
View File
@@ -325,6 +325,13 @@ async fn run_turn(ctx: &mut TurnCtx) -> Result<()> {
};
cmd.arg(prompt);
prepare_env(&mut cmd);
// The sandbox blocks the keyring `gh` keeps its token in ("stored token is
// invalid" from inside the workspace), so resolve it out here and pass it
// down; both `gh` and its git credential helper prefer these env vars.
if let Some(token) = crate::local::git::resolve_github_token() {
cmd.env("GH_TOKEN", &token);
cmd.env("GITHUB_TOKEN", token);
}
let mut child = cmd
.spawn()