Conversation
Lets Claude Code recover from a protected-branch block as a single tool call. - gx pivot "<task>" "<agent>" — wraps agent-branch-start + dirty-tree migration; emits machine-parseable WORKTREE_PATH=/BRANCH=/NEXT_STEP= trailer AI agents can parse to know exactly where to cd. Short-circuits inside an existing agent/* worktree so it's safe to call as a no-op. - gx ship — alias for gx finish --via-pr --wait-for-merge --cleanup, injecting any of those flags the caller forgot. Encodes the non-negotiable Claude finish rule. - skill_guard: widen SHELL_ALLOWED_SEGMENTS to allow git pull --ff-only, git pull --rebase, git stash list/show, git push origin agent/..., the full gh pr / gh issue / gh workflow surface, any gx <subcommand>, and agent-branch-finish.sh / agent-pivot.sh. - BLOCKED messages now point at gx pivot first and clarify that the override envs must be exported in the harness env, not as a command prefix. Tests: test/pivot.test.js (2 cases) — protected-branch pivot trailer + agent worktree short-circuit. Whitelist regex covered by inline self-test (19/19).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated by gx branch finish (PR flow).