Repository navigation
Closed
Description
Purpose
Reduce the friction the agent harness adds to ordinary Git delivery (add, commit, push, PR creation) without widening any hard denial. Today an allow-prefixed command whose form is not in the precise allowlist is refused outright by guard_command.py allowed (exit 2), and so is every command that shell_syntax cannot inspect statically. Neither path can reach the human.
Audit evidence (2026-10-08 to 2026-10-15): 5238 tool calls observed, 474 blocked; 242 of the blocks are allowed-rule mismatches, 118 forbidden rules, 112 dangerous Git.
Scope
- Match precise command rules against whole shell segments (
grep --null-data) instead of line by line. This closes a bypass where a multi-line quoted argument passes when any inner line matches an allowed pattern, and lets multi-line quoted commit messages match anchored rules. - Accept any number of
-marguments with single or double quotes, mixed, forgit commitandgit commit --amend. - Return
permissionDecision: askinstead of exit 2 when an allow-prefixed command does not match a precise rule, or when the command cannot be inspected statically. Keep exit 2 for forbidden regex rules, deny prefixes, dangerous Git operations, and secret policies. Non-Claude adapters keep blocking until their hook output formats support prompts. - Resolve
$HOMEand a leading~statically in shell inspection, so the verification commands documented in the git-workflow skill are inspectable. - In the verification scope check, allow Write/Edit targets and directory changes under the session temp directories (
TMPDIR,CLAUDE_TMPDIR), and prompt rather than deny for other out-of-worktree targets. Registration failures stay denied. - Record escalations in the audit log with the governed prefix so later rule widening is evidence-based.
- State the canonical commit command form in the git-workflow skill and record the decision in an ADR.
Out of scope
- Changes to the agent-harness renderer (furedea/agent-harness).
- Prompt support in the Codex, Devin, Hermes, and pi adapters.
- The stale untracked
.cc-overlap-tmp/directory and the uncommitted host-name revert in the working tree.
Acceptance criteria
uv run --frozen pytest tests/agentspasses.- A multi-line double-quoted commit message with a trailer passes the allowed-command guard; a multi-line argument whose inner line matches an allowed pattern no longer passes.
- An allow-prefixed but unlisted form such as
gh pr review 42 --approveexits 0 with an ask decision on Claude and still exits 2 through the Codex adapter. "$HOME/.claude/hooks/verification_session.py" status <record>andcd ~/xare parsed;~userand other expansions are still escalated.- A Write under
$TMPDIRpasses the scope check in a registered session; acdto a sibling repository asks instead of denying. - After
home-manager switch, an allow-prefixed unlisted command shows a permission prompt in an interactive Claude Code session (manual check, documented in the PR).
Metadata
Metadata
Assignees
Labels
No labels
Activity
furedea commentedon Oct 15, 2026
Implementation is in #159 (branch
feat/escalate-unrecognized-command-forms).Status against the scope:
$HOMEand~, temp directories in the verification scope with ask for other outside targets, auditdetaillabels, commit form in the git-workflow skill, ADR-0033, andgit commit *excluded from the Claude sandbox so SSH signing works.home-manager switch, confirm in an interactive Claude Code session that an allow-prefixed but unlisted form (for examplegh pr review 1 --approve) shows a permission prompt instead of a hook error.git push *to the sandbox exclusions. The push credential helper cannot read the gh configuration inside the sandbox, so pushes from an agent session still need the sandbox disabled for that one command. The settings edit was refused by the auto-mode classifier as self-modification; apply it by hand if wanted.furedea commentedon Oct 15, 2026
Manual check after home-manager switch passed: an allowed prefix in an unlisted form (cat README.md > /dev/null) showed a permission prompt and ran only after approval, the documented verify-status command with $HOME passed the hook, and a Write into the session scratchpad passed the scope check. #159 now closes this issue on merge.
fix(claude): run git push outside the sandbox so the credential helpe…
fix(claude): run git push outside the sandbox so the credential helpe…
docs(skills): run commit and push as standalone commands
docs(skills): list every call shape that stays sandboxed
build(nix): update agent-config (#454)