This is an automated email from the ASF dual-hosted git repository.
zyxxoo pushed a commit to branch refactor/rust-rewrite-design
in repository https://gitbox.apache.org/repos/asf/hugegraph.git
The following commit(s) were added to refs/heads/refactor/rust-rewrite-design
by this push:
new a35900180 chore(tools): add autonomous codex resume loop
a35900180 is described below
commit a3590018041ff3a0fd971f1f1614145a25d96976
Author: vaughn <[email protected]>
AuthorDate: Sun Sep 13 16:13:36 2026 +0800
chore(tools): add autonomous codex resume loop
---
tools/run-codex-loop.sh | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/tools/run-codex-loop.sh b/tools/run-codex-loop.sh
new file mode 100755
index 000000000..72f1eb961
--- /dev/null
+++ b/tools/run-codex-loop.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+set -u
+
+repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+sentinel="${CODEX_LOOP_SENTINEL:-/tmp/hugegraph-rust-rewrite-go}"
+prompt='继续原目标。不要询问是否继续,不要只汇报状态。只要还有可执行工作,就立刻修改、测试、归档证据、提交或推送。不要调用 blocked。只有
Go/No-Go 清单明确为 GO 后,创建 /tmp/hugegraph-rust-rewrite-go 并停止。'
+
+cd "$repo_dir" || exit 1
+while [[ ! -e "$sentinel" ]]; do
+ codex resume --last \
+ --dangerously-bypass-approvals-and-sandbox \
+ "$prompt"
+ status=$?
+ [[ -e "$sentinel" ]] && break
+ echo "codex session exited with status $status; resuming in 2s" >&2
+ sleep 2
+done
+
+echo "codex loop finished: $sentinel exists"