Repository navigation
feat(agents): remote agent sessions install the git hooks - #5126
Conversation
A Claude Code cloud session runs a SessionStart hook that installs the hooks of .pre-commit-config.yaml when CLAUDE_CODE_REMOTE is true. The Copilot setup steps install the hooks and their environments.
|
Checks run before the push (branch at 54d21dd, on origin/main 22176a0):
Manual check of the hook command (repeatable): clone the branch into a temporary directory, read the command from
Not verified here: a live claude.ai/code session and a live Copilot agent run. The Owner steps: none. After the merge, GitHub reads |
🤖 I have created a release *beep* *boop* --- ## [0.120.0](v0.119.0...v0.120.0) (2026-11-12) ### Features * **agents:** remote agent sessions install the git hooks ([#5126](#5126)) ([a04e7a9](a04e7a9)) ### Bug Fixes * **k8s:** give the ollama-16gib tier a memory limit ([#5117](#5117)) ([22176a0](22176a0)) * **roadmap:** the Status writer guards an equal label ([#5116](#5116)) ([aaf3eaf](aaf3eaf)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
|
Review findings after the merge, and what I did:
|
Claude Code cloud sessions and the Copilot cloud agent installed no git hooks, so their commits and pushes ran no hook. Only the devcontainer installs them, at each start.
.claude/settings.jsonand its template get a SessionStart hook (matcherstartup|resume). WhenCLAUDE_CODE_REMOTEistrueanduvand.pre-commit-config.yamlexist, it runsuv run pre-commit installin$CLAUDE_PROJECT_DIR, with the output on stderr. Else it exits 0. This is the pattern of the Claude Code cloud environment document, and a failed hook does not block the session.copilot-setup-steps.ymlrunsuv run pre-commit install --install-hooks. The agent firewall does not govern a setup step, so the step also builds the hook environments.CONTRIBUTING.mdsays how each agent host installs the hooks.Closes #4773
Change:
openspec/changes/archive/2026-11-12-4773-remote-agent-sessions-install-the-git/