mirror of
https://github.com/openai/codex.git
synced 2026-04-28 02:11:08 +03:00
wip
This commit is contained in:
@@ -68,7 +68,7 @@ Tasks live under `agentydragon/tasks/` as individual Markdown files. Please upda
|
||||
agentydragon/tasks/launch-commit-agent.sh <task-slug|NN> [<task-slug|NN>...]
|
||||
```
|
||||
|
||||
After the Developer agent finishes and updates the task file, the Commit agent will emit the commit message on stdout. An external orchestrator will then stage files, run pre-commit hooks, and perform the actual `git commit`. You do not need to run `git commit` manually.
|
||||
After the Developer agent finishes and updates the task file, the Commit agent will write the commit message to a temporary file and then commit using that file (`git commit -F`). An external orchestrator can then stage files and run pre-commit hooks as usual. You do not need to run `git commit` manually.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
# Launch the non-interactive Codex Commit agent for a given task worktree,
|
||||
# using the prompt in prompts/commit.md and the task's Markdown file.
|
||||
#
|
||||
# Usage: launch-commit-agent.sh <task-slug|NN>
|
||||
|
||||
# Usage: launch-commit-agent.sh <task-slug|NN> [<task-slug|NN>...]
|
||||
set -euo pipefail
|
||||
|
||||
# Allocate a temporary file to capture the agent's commit message
|
||||
last_message_file="$(mktemp)"
|
||||
trap 'rm -f "$last_message_file"' EXIT
|
||||
|
||||
# Usage: one or more task IDs or slugs
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "Usage: $0 <task-slug|NN> [<task-slug|NN>...]" >&2
|
||||
@@ -57,9 +60,10 @@ for input in "$@"; do
|
||||
# Perform commit in the task worktree
|
||||
echo "--- Processing task $task_slug ---"
|
||||
cd "$worktree_path"
|
||||
cmd=(codex --full-auto exec)
|
||||
cmd=(codex --full-auto exec --output-last-message "$last_message_file")
|
||||
echo "Running: ${cmd[*]}"
|
||||
message=$("${cmd[@]}" "$(<"$prompt_file")"$'\n\n'"$(<"$task_file")")
|
||||
# Write the agent's final message to file, then commit using that file
|
||||
"${cmd[@]}" "$(<"$prompt_file")"$'\n\n'"$(<"$task_file")"
|
||||
git add -u
|
||||
git commit -m "$message"
|
||||
git commit -F "$last_message_file"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user