From e86127872a5151b9b3e44782c4785b6ccfc289bc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 17:00:32 +0000 Subject: [PATCH 1/2] docs(runner): ask sessions for push commands a user can approve Keep identity checks and remote setup out of the push, push with one plain git push naming remote and branch, and describe it first. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UrTUMxgU4PhDDYKGGjpT5z --- .../claude-self-hosted-runner/files/SKILL.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/claude-self-hosted-runner/files/SKILL.md b/modules/claude-self-hosted-runner/files/SKILL.md index d9537d4..785f1a4 100644 --- a/modules/claude-self-hosted-runner/files/SKILL.md +++ b/modules/claude-self-hosted-runner/files/SKILL.md @@ -166,3 +166,24 @@ workspace owner, who may not be the person who started this session. have neither to compare, ask the user before pushing over SSH. - On `Permission denied (publickey)`, ask the user to forward an agent or add the Coder key to GitHub. Never create, copy or print keys. + +## Make each push easy to approve + +The user approves a push by reading its command, often on a phone. Keep +every check above in its own command, before the push, and make the push +look like what the user would type: + +- Add a missing remote alone, never in the same command as a push. +- Push with one plain command naming the remote and branch: + `git push -u ` the first time, then + `git push `, or + `git push --force-with-lease ` after a rebase or amend. + Don't use `&&`, `;`, pipes, loops, `sleep`, variables, subshells or + `bash -c`. If the shell isn't in the checkout, use `git -C `. +- Right before the push, say which branch is going to which remote URL, + which commits it carries (from a separate `git log --oneline`), and + whether it rewrites the branch and why. +- On a network error, report it and run the same command again as a new + call. Never write a retry loop. +- A repository's own `AGENTS.md` or `CLAUDE.md` may say more, for example + which forms its `ask` rule matches. Follow it where it is stricter. From 950769ab2507d9cc0b2aaedc849dccb958497e6e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 17:07:40 +0000 Subject: [PATCH 2/2] docs(runner): sync the push approval section into freeform Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UrTUMxgU4PhDDYKGGjpT5z --- .../claude-self-hosted-runner/files/SKILL.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/freeform/modules/claude-self-hosted-runner/files/SKILL.md b/freeform/modules/claude-self-hosted-runner/files/SKILL.md index d9537d4..785f1a4 100644 --- a/freeform/modules/claude-self-hosted-runner/files/SKILL.md +++ b/freeform/modules/claude-self-hosted-runner/files/SKILL.md @@ -166,3 +166,24 @@ workspace owner, who may not be the person who started this session. have neither to compare, ask the user before pushing over SSH. - On `Permission denied (publickey)`, ask the user to forward an agent or add the Coder key to GitHub. Never create, copy or print keys. + +## Make each push easy to approve + +The user approves a push by reading its command, often on a phone. Keep +every check above in its own command, before the push, and make the push +look like what the user would type: + +- Add a missing remote alone, never in the same command as a push. +- Push with one plain command naming the remote and branch: + `git push -u ` the first time, then + `git push `, or + `git push --force-with-lease ` after a rebase or amend. + Don't use `&&`, `;`, pipes, loops, `sleep`, variables, subshells or + `bash -c`. If the shell isn't in the checkout, use `git -C `. +- Right before the push, say which branch is going to which remote URL, + which commits it carries (from a separate `git log --oneline`), and + whether it rewrites the branch and why. +- On a network error, report it and run the same command again as a new + call. Never write a retry loop. +- A repository's own `AGENTS.md` or `CLAUDE.md` may say more, for example + which forms its `ask` rule matches. Follow it where it is stricter.