Context
Follow-up to #26.
start-issue v1.13.2 builds the HUMAN_GATE command in scripts/lib/start_issue/agent.sh as:
codex exec \
[--model "$MODEL"] \
--cd "$WORKTREE_PATH" \
--ask-for-approval never \
--sandbox workspace-write \
--json \
--output-last-message "$STATE_DIR/last-message.txt" \
-
This launcher no longer provides a reliable path to STATUS: DONE for issue workflows that include normal GitHub delivery.
Problems
1. Current Codex CLI rejects the generated argument order
With codex-cli 0.144.6:
error: unexpected argument --ask-for-approval found
--ask-for-approval is currently a top-level option, so the accepted form is approximately:
codex --ask-for-approval never exec ...
The generated HUMAN_GATE command should be verified against the supported Codex CLI version instead of assuming the older option layout.
2. workspace-write plus never is insufficient for end-to-end delivery
Even after correcting the argument order, the hard-coded permission combination has two relevant boundaries:
workspace-write has network access disabled by default. The agent cannot read issue comments or linked sources, inspect remote CI, push, or create a PR unless network is separately enabled.
- Codex protects
.git and a worktree resolved gitdir in the workspace-write sandbox. With approval policy never, the batch session has no escalation path for commit/ref writes.
A repository can enable shell network access with:
[sandbox_workspace_write]
network_access = true
That allows authenticated gh operations, but it does not remove the protected .git boundary. The result is that an otherwise clear delivery can edit and test files yet still fail or produce a spurious STATUS: HUMAN_GATE before commit, push, and PR creation.
Reproduction
Environment:
start-issue v1.13.2
codex-cli 0.144.6
- macOS
Steps:
- Run
start-issue 123 --agent codex --human-gate --dry-run and inspect the generated command.
- Run the generated
codex exec ... --ask-for-approval never ... form with Codex 0.144.6; it is rejected before prompt execution.
- Move the approval option before
exec and run with --sandbox workspace-write in a repository without explicit network access; GitHub reads/actions are unavailable.
- Enable
sandbox_workspace_write.network_access = true; authenticated gh works, but the sandbox still does not provide the Git metadata writes required by the delivery contract.
Expected behavior
HUMAN_GATE mode should have an explicit, documented permission contract that matches its advertised workflow:
- the generated command is valid for supported Codex CLI versions;
- the agent can read the complete GitHub issue context, including comments and linked sources;
- a normal successful run can edit, test, commit, push, and create/update a PR;
- genuine product, security, production, or approval decisions still return
STATUS: HUMAN_GATE;
- missing capabilities fail early with a precise diagnostic rather than being reported as a task-level Human Gate.
The implementation could use a configurable Codex permission/profile mechanism rather than hard-coding one policy. The exact safe default is a design decision, but the mode should distinguish working-tree-only automation from full Git delivery.
Acceptance criteria
Context
Follow-up to #26.
start-issue v1.13.2builds the HUMAN_GATE command inscripts/lib/start_issue/agent.shas:This launcher no longer provides a reliable path to
STATUS: DONEfor issue workflows that include normal GitHub delivery.Problems
1. Current Codex CLI rejects the generated argument order
With
codex-cli 0.144.6:--ask-for-approvalis currently a top-level option, so the accepted form is approximately:codex --ask-for-approval never exec ...The generated HUMAN_GATE command should be verified against the supported Codex CLI version instead of assuming the older option layout.
2.
workspace-writeplusneveris insufficient for end-to-end deliveryEven after correcting the argument order, the hard-coded permission combination has two relevant boundaries:
workspace-writehas network access disabled by default. The agent cannot read issue comments or linked sources, inspect remote CI, push, or create a PR unless network is separately enabled..gitand a worktree resolved gitdir in theworkspace-writesandbox. With approval policynever, the batch session has no escalation path for commit/ref writes.A repository can enable shell network access with:
That allows authenticated
ghoperations, but it does not remove the protected.gitboundary. The result is that an otherwise clear delivery can edit and test files yet still fail or produce a spuriousSTATUS: HUMAN_GATEbefore commit, push, and PR creation.Reproduction
Environment:
start-issue v1.13.2codex-cli 0.144.6Steps:
start-issue 123 --agent codex --human-gate --dry-runand inspect the generated command.codex exec ... --ask-for-approval never ...form with Codex 0.144.6; it is rejected before prompt execution.execand run with--sandbox workspace-writein a repository without explicit network access; GitHub reads/actions are unavailable.sandbox_workspace_write.network_access = true; authenticatedghworks, but the sandbox still does not provide the Git metadata writes required by the delivery contract.Expected behavior
HUMAN_GATE mode should have an explicit, documented permission contract that matches its advertised workflow:
STATUS: HUMAN_GATE;The implementation could use a configurable Codex permission/profile mechanism rather than hard-coding one policy. The exact safe default is a design decision, but the mode should distinguish working-tree-only automation from full Git delivery.
Acceptance criteria