Skip to content

Add Claude Code session initialization hooks#27

Merged
fullstackjam merged 1 commit intomainfrom
claude/github-cli-ci-logs-vOCEW
Apr 19, 2026
Merged

Add Claude Code session initialization hooks#27
fullstackjam merged 1 commit intomainfrom
claude/github-cli-ci-logs-vOCEW

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

What does this PR do?

Add session initialization hooks that pre-warm Go build and test caches when starting a Claude Code session on the web, improving performance for subsequent builds and tests.

Why?

When working in Claude Code on the web, the first go build or go test commands can be slow because the build cache is cold. By pre-fetching dependencies and warming the build/test caches during session startup, we can make the initial developer experience faster and ensure tests/builds work offline.

This only runs in Claude Code on the web (via the CLAUDE_CODE_REMOTE environment variable) and is skipped on local machines.

Testing

N/A - This is a configuration change that only affects Claude Code web sessions. The hook script is straightforward shell commands that mirror standard Go workflows.

Notes for reviewer

  • The .claude/ directory is now partially tracked in git (hooks and settings) while still ignoring local overrides (.claude/settings.local.json) and other generated files
  • The session-start hook only executes in Claude Code remote environments to avoid unnecessary overhead on local development machines

https://claude.ai/code/session_01PeXAW2DA8BnTmFvStfNmWn

Pre-fetches Go modules and warms the build/test caches when a remote
Claude Code session starts, so linters and unit tests can run without
extra setup. Gated on CLAUDE_CODE_REMOTE=true so it is a no-op locally.

https://claude.ai/code/session_01PeXAW2DA8BnTmFvStfNmWn
@github-actions
Copy link
Copy Markdown

👋 Thanks for opening this pull request!

Before merging:

  • Code follows existing patterns in the codebase
  • go build ./... and go vet ./... pass
  • Commit message is clear and descriptive

@fullstackjam will review this soon. Thanks for contributing! 🚀

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullstackjam fullstackjam merged commit 045ef77 into main Apr 19, 2026
9 checks passed
@fullstackjam fullstackjam deleted the claude/github-cli-ci-logs-vOCEW branch April 19, 2026 08:39
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.

2 participants