Skip to content

Record finish approval blocker#446

Merged
NagyVikt merged 2 commits intomainfrom
agent/codex/block-shell-output-redirect-hook-bypass-2026-04-28-11-01
Apr 28, 2026
Merged

Record finish approval blocker#446
NagyVikt merged 2 commits intomainfrom
agent/codex/block-shell-output-redirect-hook-bypass-2026-04-28-11-01

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

NagyVikt added 2 commits April 28, 2026 11:10
The managed PreToolUse hooks already block direct Write/Edit tools on protected branches, but Bash allowlisting could classify command names like cat or printf as read-only before accounting for shell output redirection. The guard now detects file-writing redirection first and keeps stderr-only diagnostics allowed.

Constraint: Protected main/dev edits must pivot into agent worktrees before file mutation
Rejected: Remove cat/echo/printf from the allowlist | harmless read-only diagnostics still need those commands
Confidence: high
Scope-risk: narrow
Directive: Check redirection before treating a Bash segment as read-only by command name
Tested: python3 -m py_compile .codex/hooks/skill_guard.py .claude/hooks/skill_guard.py
Tested: node --test --test-name-pattern "repo hook settings reference real local hook directories|repo skill guard blocks shell output redirect bypasses" test/setup.test.js
Tested: openspec validate agent-codex-block-shell-output-redirect-hook-bypass-2026-04-28-11-01 --type change --strict
Tested: openspec validate --specs
Not-tested: Full test/setup.test.js currently fails unrelated OpenSpec branch-start reuse assertion
The hook guard fix is implemented and locally verified, but remote finish requires network approval. The cleanup checklist now records the exact blocked finish command and retry condition so the lane can resume without re-discovering state.

Constraint: Approval reviewer rejected network finish because usage limit is reached until 3:40 PM
Confidence: high
Scope-risk: narrow
Tested: git status shows only the blocker note before commit
Not-tested: Remote PR/merge/cleanup, blocked by approval quota
@NagyVikt NagyVikt merged commit f885a24 into main Apr 28, 2026
2 of 5 checks passed
@NagyVikt NagyVikt deleted the agent/codex/block-shell-output-redirect-hook-bypass-2026-04-28-11-01 branch April 28, 2026 09:13
NagyVikt added a commit that referenced this pull request Apr 28, 2026
The original hook-redirect branch merged successfully after the approval window reset, but its OpenSpec cleanup checklist still carried the prior usage-limit blocker. This records the PR, merge commit, and branch/worktree cleanup evidence so future resume paths do not reopen a completed lane.

Constraint: Original branch was already merged as PR #446 before cleanup evidence could be amended in-place

Rejected: Leave the blocker note in place | it would make a merged and cleaned lane look unfinished

Confidence: high

Scope-risk: narrow

Tested: openspec validate agent-codex-block-shell-output-redirect-hook-bypass-2026-04-28-11-01 --type change --strict

Tested: openspec validate --specs

Not-tested: Runtime hook behavior; bookkeeping-only change

Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant