From 11cfc055af7f6561dd9341615c924594f1e76f48 Mon Sep 17 00:00:00 2001 From: Massan Date: Sun, 4 May 2025 22:05:27 +0900 Subject: [PATCH 01/34] Add PowerShell script for Windows DevContainer setup (Docker/Podman) --- Script/run_devcontainer_claude_code.ps1 | 139 ++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 Script/run_devcontainer_claude_code.ps1 diff --git a/Script/run_devcontainer_claude_code.ps1 b/Script/run_devcontainer_claude_code.ps1 new file mode 100644 index 00000000..b578a664 --- /dev/null +++ b/Script/run_devcontainer_claude_code.ps1 @@ -0,0 +1,139 @@ +#------------------------------------------------------------------------------ +# Script: run_devcontainer_claude_code.ps1 +# Author: [Your Name or Project Name] +# Description: Automates the setup and connection to a DevContainer environment +# using either Docker or Podman on Windows. +# +# IMPORTANT USAGE REQUIREMENT: +# This script MUST be executed from the ROOT directory of your project. +# It assumes the script file itself is located in a 'Script' subdirectory. +# +# Assumed Project Structure: +# Project/ +# ├── .devcontainer/ +# └── Script/ +# └── run_devcontainer_claude_code.ps1 <-- This script's location +# +# How to Run: +# 1. Open PowerShell. +# 2. Change your current directory to the project root: +# cd c:\path\to\your\Project +# 3. Execute the script, specifying the container backend: +# .\Script\run_devcontainer_claude_code.ps1 -Backend +# +# The -Backend parameter is mandatory and accepts 'docker' or 'podman'. +#------------------------------------------------------------------------------ +[CmdletBinding()] +param( + [Parameter(Mandatory=$true)] + [string]$Backend +) + +# Notify script start +Write-Host "--- DevContainer Startup & Connection Script ---" +Write-Host "Using backend: $($Backend)" + +# Validate the input backend +if ($Backend -notin @('docker', 'podman')) { + Write-Error "Invalid backend specified. Please use 'docker' or 'podman'." + Write-Host "Usage: ." + $MyInvocation.MyCommand.Definition + " -Backend " + exit 1 +} + +# --- Backend-Specific Initialization --- +if ($Backend -eq 'podman') { + Write-Host "--- Podman Backend Initialization ---" + + # --- Step 1a: Initialize Podman machine --- + Write-Host "Initializing Podman machine 'claudeVM'..." + try { + podman machine init claudeVM + Write-Host "Podman machine 'claudeVM' initialized or already exists." + } catch { + Write-Error "Failed to initialize Podman machine: $($_.Exception.Message)" + exit 1 # Exit script on error + } + + # --- Step 1b: Start Podman machine --- + Write-Host "Starting Podman machine 'claudeVM'..." + try { + podman machine start claudeVM -q + Write-Host "Podman machine started or already running." + } catch { + Write-Error "Failed to start Podman machine: $($_.Exception.Message)" + exit 1 + } + + # --- Step 2: Set default connection --- + Write-Host "Setting default Podman connection to 'claudeVM'..." + try { + podman system connection default claudeVM + Write-Host "Default connection set." + } catch { + Write-Warning "Failed to set default Podman connection (may be already set or machine issue): $($_.Exception.Message)" + } + +} elseif ($Backend -eq 'docker') { + Write-Host "--- Docker Backend Initialization ---" + + # --- Step 1 & 2: Check Docker Desktop --- + Write-Host "Checking if Docker Desktop is running and docker command is available..." + try { + docker info | Out-Null + Write-Host "Docker Desktop (daemon) is running." + } catch { + Write-Error "Docker Desktop is not running or docker command not found." + Write-Error "Please ensure Docker Desktop is running." + exit 1 + } +} + +# --- Step 3: Bring up DevContainer --- +Write-Host "Bringing up DevContainer in the current folder..." +try { + $devcontainerUpCommand = "devcontainer up --workspace-folder ." + if ($Backend -eq 'podman') { + $devcontainerUpCommand += " --docker-path podman" + } + Invoke-Expression $devcontainerUpCommand + Write-Host "DevContainer startup process completed." +} catch { + Write-Error "Failed to bring up DevContainer: $($_.Exception.Message)" + exit 1 +} + +# --- Step 4: Get DevContainer ID --- +Write-Host "Finding the DevContainer ID..." +$currentFolder = (Get-Location).Path + +$psCommand = "$($Backend) ps --filter ""label=devcontainer.local_folder=$currentFolder"" --format ""{{.ID}}""" + +try { + $containerId = $(Invoke-Expression $psCommand).Trim() +} catch { + Write-Error "Failed to get container ID (Command: $psCommand): $($_.Exception.Message)" + exit 1 +} + +if (-not $containerId) { + Write-Error "Could not find DevContainer ID for the current folder ('$currentFolder')." + Write-Error "Please check if 'devcontainer up' was successful and the container is running." + exit 1 +} +Write-Host "Found container ID: $containerId" + +# --- Step 5 & 6: Execute command and enter interactive shell inside container --- +Write-Host "Executing 'claude' command and then starting zsh session inside container $($containerId)..." +try { + $execCommand = "$($Backend) exec -it $containerId zsh -c 'claude; exec zsh'" + Invoke-Expression $execCommand + + Write-Host "Interactive session ended." + +} catch { + Write-Error "Failed to execute command inside container (Command: $execCommand): $($_.Exception.Message)" + exit 1 +} + +# Notify script completion +Write-Host "--- Script completed ---" \ No newline at end of file From a6091b65c012c022314e66b1fc3c73843ee104c6 Mon Sep 17 00:00:00 2001 From: Masa1984a Date: Sun, 15 Jun 2025 11:34:23 +0900 Subject: [PATCH 02/34] fix: Add nano and vim editors to devcontainer with default editor config Fixes #2098 - Add nano and vim to provide editor choices for users - Set EDITOR and VISUAL environment variables to nano as default - This ensures /memory command and other tools work out of the box Users can still change their preferred editor by setting these environment variables in their shell configuration. --- .devcontainer/Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 04fffd16..1a3ca1dd 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -19,7 +19,9 @@ RUN apt update && apt install -y less \ iproute2 \ dnsutils \ aggregate \ - jq + jq \ + nano \ + vim # Ensure default node user has access to /usr/local/share RUN mkdir -p /usr/local/share/npm-global && \ @@ -57,6 +59,10 @@ ENV PATH=$PATH:/usr/local/share/npm-global/bin # Set the default shell to zsh rather than sh ENV SHELL=/bin/zsh +# Set the default editor and visual +ENV EDITOR nano +ENV VISUAL nano + # Default powerline10k theme RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.0/zsh-in-docker.sh)" -- \ -p git \ From 21cf5c2293f4e0c517320d585589b85e29fb9c7f Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 24 Jun 2025 00:05:58 +0000 Subject: [PATCH 03/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bb6efee..4453f768 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,34 @@ # Changelog +## 1.0.31 + +- Fixed a bug where ~/.claude.json would get reset when file contained invalid JSON + +## 1.0.30 + +- Custom slash commands: Run bash output, @-mention files, enable thinking with thinking keywords +- Improved file path autocomplete with filename matching +- Added timestamps in Ctrl-r mode and fixed Ctrl-c handling +- Enhanced jq regex support for complex filters with pipes and select + +## 1.0.29 + +- Improved CJK character support in cursor navigation and rendering + +## 1.0.28 + +- Slash commands: Fix selector display during history navigation +- Resizes images before upload to prevent API size limit errors +- Added XDG_CONFIG_HOME support to configuration directory +- Performance optimizations for memory usage +- New attributes (terminal.type, language) in OpenTelemetry logging + ## 1.0.27 - Streamable HTTP MCP servers are now supported - Remote MCP servers (SSE and HTTP) now support OAuth - MCP resources can now be @-mentioned +- /resume slash command to switch conversations within Claude Code ## 1.0.25 From a8e927ee244c70a3755944e0bd8cc48c4ddbd3cd Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 24 Jun 2025 21:59:12 +0000 Subject: [PATCH 04/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4453f768..3b1d7891 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 1.0.34 + +- Fixed a memory leak causing a MaxListenersExceededWarning message to appear + +## 1.0.33 + +- Improved logging functionality with session ID support +- Added undo functionality (Ctrl+Z and vim 'u' command) +- Improvements to plan mode + +## 1.0.32 + +- Updated loopback config for litellm +- Added forceLoginMethod setting to bypass login selection screen + ## 1.0.31 - Fixed a bug where ~/.claude.json would get reset when file contained invalid JSON From 5f9dcdb410e77a6ec5e94bbfbeaceaf093e76c18 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 25 Jun 2025 21:45:26 +0000 Subject: [PATCH 05/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b1d7891..26d019a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.0.35 + +- Added support for MCP OAuth Authorization Server discovery + ## 1.0.34 - Fixed a memory leak causing a MaxListenersExceededWarning message to appear From 390f11039c4986f2172aae21c6380d2b5a8b251e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 30 Jun 2025 23:11:52 +0000 Subject: [PATCH 06/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26d019a3..37834b60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 1.0.38 + +- Released [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks). Special thanks to community input in [Github Issues](https://github.com/anthropics/claude-code/issues/712) + +## 1.0.37 + +- Remove ability to set `Proxy-Authorization` header via ANTHROPIC_AUTH_TOKEN or apiKeyHelper + +## 1.0.36 + +- Web search now takes today's date into context +- Fixed a bug where stdio MCP servers were not terminating properly on exit + ## 1.0.35 - Added support for MCP OAuth Authorization Server discovery From 80ddbcd96de5c2475bb7733bc6c7f210887bcb23 Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Tue, 1 Jul 2025 08:07:03 -0700 Subject: [PATCH 07/34] Merge pull request #2779 from anthropics/ashwin/triage refactor: Replace custom GitHub actions with claude-code-base-action --- .github/actions/claude-code-action/action.yml | 136 ------------------ .../claude-issue-triage-action/action.yml | 87 ----------- .github/workflows/claude-issue-triage.yml | 96 +++++++++++-- 3 files changed, 88 insertions(+), 231 deletions(-) delete mode 100644 .github/actions/claude-code-action/action.yml delete mode 100644 .github/actions/claude-issue-triage-action/action.yml diff --git a/.github/actions/claude-code-action/action.yml b/.github/actions/claude-code-action/action.yml deleted file mode 100644 index 8e57c63c..00000000 --- a/.github/actions/claude-code-action/action.yml +++ /dev/null @@ -1,136 +0,0 @@ -name: "Claude Code Action" -description: "Run Claude Code in GitHub Actions workflows" - -inputs: - github_token: - description: "GitHub token with repo and issues permissions" - required: true - anthropic_api_key: - description: "Anthropic API key" - required: true - prompt: - description: "The prompt to send to Claude Code" - required: false - default: "" - prompt_file: - description: "Path to a file containing the prompt to send to Claude Code" - required: false - default: "" - allowed_tools: - description: "Comma-separated list of allowed tools for Claude Code to use" - required: false - default: "" - output_file: - description: "File to save Claude Code output to (optional)" - required: false - default: "" - timeout_minutes: - description: "Timeout in minutes for Claude Code execution" - required: false - default: "10" - install_github_mcp: - description: "Whether to install the GitHub MCP server" - required: false - default: "false" - -runs: - using: "composite" - steps: - - name: Install Claude Code - shell: bash - run: npm install -g @anthropic-ai/claude-code - - - name: Install GitHub MCP Server - if: inputs.install_github_mcp == 'true' - shell: bash - run: | - claude mcp add-json github '{ - "command": "docker", - "args": [ - "run", - "-i", - "--rm", - "-e", - "GITHUB_PERSONAL_ACCESS_TOKEN", - "ghcr.io/github/github-mcp-server:sha-ff3036d" - ], - "env": { - "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ inputs.GITHUB_TOKEN }}" - } - }' - - - name: Prepare Prompt File - shell: bash - id: prepare_prompt - run: | - # Check if either prompt or prompt_file is provided - if [ -z "${{ inputs.prompt }}" ] && [ -z "${{ inputs.prompt_file }}" ]; then - echo "::error::Neither 'prompt' nor 'prompt_file' was provided. At least one is required." - exit 1 - fi - - # Determine which prompt source to use - if [ ! -z "${{ inputs.prompt_file }}" ]; then - # Check if the prompt file exists - if [ ! -f "${{ inputs.prompt_file }}" ]; then - echo "::error::Prompt file '${{ inputs.prompt_file }}' does not exist." - exit 1 - fi - - # Use the provided prompt file - PROMPT_PATH="${{ inputs.prompt_file }}" - else - mkdir -p /tmp/claude-action - PROMPT_PATH="/tmp/claude-action/prompt.txt" - echo "${{ inputs.prompt }}" > "$PROMPT_PATH" - fi - - # Verify the prompt file is not empty - if [ ! -s "$PROMPT_PATH" ]; then - echo "::error::Prompt is empty. Please provide a non-empty prompt." - exit 1 - fi - - # Save the prompt path for the next step - echo "PROMPT_PATH=$PROMPT_PATH" >> $GITHUB_ENV - - - name: Run Claude Code - shell: bash - id: run_claude - run: | - ALLOWED_TOOLS_ARG="" - if [ ! -z "${{ inputs.allowed_tools }}" ]; then - ALLOWED_TOOLS_ARG="--allowedTools ${{ inputs.allowed_tools }}" - fi - - # Set a timeout to ensure the command doesn't run indefinitely - timeout_seconds=$((${{ inputs.timeout_minutes }} * 60)) - - if [ -z "${{ inputs.output_file }}" ]; then - # Run Claude Code and output to console - timeout $timeout_seconds claude \ - -p \ - --verbose \ - --output-format stream-json \ - "$(cat ${{ env.PROMPT_PATH }})" \ - ${{ inputs.allowed_tools != '' && format('--allowedTools "{0}"', inputs.allowed_tools) || '' }} - else - # Run Claude Code and tee output to console and file - timeout $timeout_seconds claude \ - -p \ - --verbose \ - --output-format stream-json \ - "$(cat ${{ env.PROMPT_PATH }})" \ - ${{ inputs.allowed_tools != '' && format('--allowedTools "{0}"', inputs.allowed_tools) || '' }} | tee output.txt - - # Process output.txt into JSON in a separate step - jq -s '.' output.txt > output.json - - # Extract the result from the last item in the array (system message) - jq -r '.[-1].result' output.json > "${{ inputs.output_file }}" - - echo "Complete output saved to output.json, final response saved to ${{ inputs.output_file }}" - fi - env: - ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key }} - GITHUB_TOKEN: ${{ inputs.github_token }} diff --git a/.github/actions/claude-issue-triage-action/action.yml b/.github/actions/claude-issue-triage-action/action.yml deleted file mode 100644 index 666efa27..00000000 --- a/.github/actions/claude-issue-triage-action/action.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: "Claude Issue Triage Action" -description: "Automatically triage GitHub issues using Claude Code" - -inputs: - timeout_minutes: - description: "Timeout in minutes for execution" - required: false - default: "5" - anthropic_api_key: - description: "Anthropic API key" - required: true - github_token: - description: "GitHub token with repo and issues permissions" - required: true - -runs: - using: "composite" - steps: - - name: Checkout repository code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Create prompt file - shell: bash - run: | - mkdir -p /tmp/claude-prompts - cat > /tmp/claude-prompts/claude-issue-triage-prompt.txt << 'EOF' - You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list. - - IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels. - - Issue Information: - - REPO: ${{ github.repository }} - - ISSUE_NUMBER: ${{ github.event.issue.number }} - - TASK OVERVIEW: - - 1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else. - - 2. Next, use the GitHub tools to get context about the issue: - - You have access to these tools: - - mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels - - mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments - - mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting) - - mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues - - mcp__github__list_issues: Use this to understand patterns in how other issues are labeled - - Start by using mcp__github__get_issue to get the issue details - - 3. Analyze the issue content, considering: - - The issue title and description - - The type of issue (bug report, feature request, question, etc.) - - Technical areas mentioned - - Severity or priority indicators - - User impact - - Components affected - - 4. Select appropriate labels from the available labels list provided above: - - Choose labels that accurately reflect the issue's nature - - Be specific but comprehensive - - Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority) - - Consider platform labels (android, ios) if applicable - - If you find similar issues using mcp__github__search_issues, consider using a "duplicate" label if appropriate. Only do so if the issue is a duplicate of another OPEN issue. - - 5. Apply the selected labels: - - Use mcp__github__update_issue to apply your selected labels - - DO NOT post any comments explaining your decision - - DO NOT communicate directly with users - - If no labels are clearly applicable, do not apply any labels - - IMPORTANT GUIDELINES: - - Be thorough in your analysis - - Only select labels from the provided list above - - DO NOT post any comments to the issue - - Your ONLY action should be to apply labels using mcp__github__update_issue - - It's okay to not add any labels if none are clearly applicable - EOF - - - name: Run Claude Code - uses: ./.github/actions/claude-code-action - with: - prompt_file: /tmp/claude-prompts/claude-issue-triage-prompt.txt - allowed_tools: "Bash(gh label list),mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__search_issues,mcp__github__list_issues" - install_github_mcp: "true" - timeout_minutes: ${{ inputs.timeout_minutes }} - anthropic_api_key: ${{ inputs.anthropic_api_key }} - github_token: ${{ inputs.github_token }} diff --git a/.github/workflows/claude-issue-triage.yml b/.github/workflows/claude-issue-triage.yml index 36fd79ba..152b3ee7 100644 --- a/.github/workflows/claude-issue-triage.yml +++ b/.github/workflows/claude-issue-triage.yml @@ -1,6 +1,5 @@ name: Claude Issue Triage -description: "Automatically triage GitHub issues using Claude Code" - +description: Automatically triage GitHub issues using Claude Code on: issues: types: [opened] @@ -12,12 +11,93 @@ jobs: permissions: contents: read issues: write - steps: - - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - name: Run Claude Issue Triage - uses: ./.github/actions/claude-issue-triage-action + steps: + - name: Create triage prompt + run: | + mkdir -p /tmp/claude-prompts + cat > /tmp/claude-prompts/triage-prompt.txt << 'EOF' + You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list. + + IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels. + + Issue Information: + - REPO: ${{ github.repository }} + - ISSUE_NUMBER: ${{ github.event.issue.number }} + + TASK OVERVIEW: + + 1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else. + + 2. Next, use the GitHub tools to get context about the issue: + - You have access to these tools: + - mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels + - mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments + - mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting) + - mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues + - mcp__github__list_issues: Use this to understand patterns in how other issues are labeled + - Start by using mcp__github__get_issue to get the issue details + + 3. Analyze the issue content, considering: + - The issue title and description + - The type of issue (bug report, feature request, question, etc.) + - Technical areas mentioned + - Severity or priority indicators + - User impact + - Components affected + + 4. Select appropriate labels from the available labels list provided above: + - Choose labels that accurately reflect the issue's nature + - Be specific but comprehensive + - Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority) + - Consider platform labels (android, ios) if applicable + - If you find similar issues using mcp__github__search_issues, consider using a "duplicate" label if appropriate. Only do so if the issue is a duplicate of another OPEN issue. + + 5. Apply the selected labels: + - Use mcp__github__update_issue to apply your selected labels + - DO NOT post any comments explaining your decision + - DO NOT communicate directly with users + - If no labels are clearly applicable, do not apply any labels + + IMPORTANT GUIDELINES: + - Be thorough in your analysis + - Only select labels from the provided list above + - DO NOT post any comments to the issue + - Your ONLY action should be to apply labels using mcp__github__update_issue + - It's okay to not add any labels if none are clearly applicable + EOF + + - name: Setup GitHub MCP Server + run: | + mkdir -p /tmp/mcp-config + cat > /tmp/mcp-config/mcp-servers.json << 'EOF' + { + "mcpServers": { + "github": { + "command": "docker", + "args": [ + "run", + "-i", + "--rm", + "-e", + "GITHUB_PERSONAL_ACCESS_TOKEN", + "ghcr.io/github/github-mcp-server:sha-7aced2b" + ], + "env": { + "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ secrets.GITHUB_TOKEN }}" + } + } + } + } + EOF + + - name: Run Claude Code for Issue Triage + uses: anthropics/claude-code-base-action@beta with: + prompt_file: /tmp/claude-prompts/triage-prompt.txt + allowed_tools: "Bash(gh label list),mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__search_issues,mcp__github__list_issues" + timeout_minutes: "5" anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - github_token: ${{ secrets.GITHUB_TOKEN }} + mcp_config: /tmp/mcp-config/mcp-servers.json + claude_env: | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From beacb9532067ce620eecca621b5448894b155232 Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Wed, 2 Jul 2025 09:01:44 -0700 Subject: [PATCH 08/34] Add checkout step to issue triage workflow (#2867) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a checkout step to the GitHub Actions workflow for issue triage to ensure the repository is available during the triage process. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- .github/workflows/claude-issue-triage.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/claude-issue-triage.yml b/.github/workflows/claude-issue-triage.yml index 152b3ee7..d534053e 100644 --- a/.github/workflows/claude-issue-triage.yml +++ b/.github/workflows/claude-issue-triage.yml @@ -13,6 +13,9 @@ jobs: issues: write steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Create triage prompt run: | mkdir -p /tmp/claude-prompts From 3d2166eec9b18ff18acccaedf2e04b3a3dfa6f0e Mon Sep 17 00:00:00 2001 From: Thariq Shihipar Date: Wed, 2 Jul 2025 09:32:33 -0700 Subject: [PATCH 09/34] proper hook file --- .../hooks/bash_command_validator_example.py | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 examples/hooks/bash_command_validator_example.py diff --git a/examples/hooks/bash_command_validator_example.py b/examples/hooks/bash_command_validator_example.py new file mode 100644 index 00000000..daed91bf --- /dev/null +++ b/examples/hooks/bash_command_validator_example.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +""" +Claude Code Hook: Bash Command Validator +========================================= +This hook runs as a PreToolUse hook for the Bash tool. +It validates bash commands against a set of rules before execution. +In this case it changes grep calls to using rg. + +Read more about hooks here: https://docs.anthropic.com/en/docs/claude-code/hooks + +Make sure to change your path to your actual script. + +{ + "hooks": { + "PreToolUse": [ + { + "matcher": "Bash", + "hooks": [ + { + "type": "command", + "command": "python -m ./bash_command_validator_example" + } + ] + } + ] + } +} + +""" + +import json +import re +import sys + +# Define validation rules as a list of (regex pattern, message) tuples +VALIDATION_RULES = [ + ( + r"\bgrep\b(?!.*\|)", + "Use 'rg' (ripgrep) instead of 'grep' for better performance and features", + ), + ( + r"\bfind\s+\S+\s+-name\b", + "Use 'rg --files | rg pattern' or 'rg --files -g pattern' instead of 'find -name' for better performance", + ), +] + + +def validate_command(command: str) -> list[str]: + issues = [] + for pattern, message in VALIDATION_RULES: + if re.search(pattern, command): + issues.append(message) + return issues + + +def main(): + try: + input_data = json.load(sys.stdin) + except json.JSONDecodeError as e: + print(f"Error: Invalid JSON input: {e}", file=sys.stderr) + sys.exit(1) + + tool_name = input_data.get("tool_name", "") + if tool_name != "Bash": + sys.exit(0) + + tool_input = input_data.get("tool_input", {}) + command = tool_input.get("command", "") + + if not command: + sys.exit(0) + + # Validate the command + issues = validate_command(command) + + if issues: + for message in issues: + print(f"• {message}", file=sys.stderr) + # Exit code 2 blocks tool call and shows stderr to Claude + sys.exit(2) + + +if __name__ == "__main__": + main() From 74ba615503bb3932fde2082b4eedddb819a4a3c4 Mon Sep 17 00:00:00 2001 From: Dickson Tsai Date: Wed, 2 Jul 2025 11:00:03 -0700 Subject: [PATCH 10/34] Script polish --- .../hooks/bash_command_validator_example.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/hooks/bash_command_validator_example.py b/examples/hooks/bash_command_validator_example.py index daed91bf..53ab7a82 100644 --- a/examples/hooks/bash_command_validator_example.py +++ b/examples/hooks/bash_command_validator_example.py @@ -18,7 +18,7 @@ Make sure to change your path to your actual script. "hooks": [ { "type": "command", - "command": "python -m ./bash_command_validator_example" + "command": "python3 /path/to/claude-code/examples/hooks/bash_command_validator_example.py" } ] } @@ -33,21 +33,21 @@ import re import sys # Define validation rules as a list of (regex pattern, message) tuples -VALIDATION_RULES = [ +_VALIDATION_RULES = [ ( - r"\bgrep\b(?!.*\|)", + r"^grep\b(?!.*\|)", "Use 'rg' (ripgrep) instead of 'grep' for better performance and features", ), ( - r"\bfind\s+\S+\s+-name\b", + r"^find\s+\S+\s+-name\b", "Use 'rg --files | rg pattern' or 'rg --files -g pattern' instead of 'find -name' for better performance", ), ] -def validate_command(command: str) -> list[str]: +def _validate_command(command: str) -> list[str]: issues = [] - for pattern, message in VALIDATION_RULES: + for pattern, message in _VALIDATION_RULES: if re.search(pattern, command): issues.append(message) return issues @@ -58,6 +58,7 @@ def main(): input_data = json.load(sys.stdin) except json.JSONDecodeError as e: print(f"Error: Invalid JSON input: {e}", file=sys.stderr) + # Exit code 1 shows stderr to the user but not to Claude sys.exit(1) tool_name = input_data.get("tool_name", "") @@ -70,9 +71,7 @@ def main(): if not command: sys.exit(0) - # Validate the command - issues = validate_command(command) - + issues = _validate_command(command) if issues: for message in issues: print(f"• {message}", file=sys.stderr) From e16c9857efbb6906fe3a719b69a6080381ee7280 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 2 Jul 2025 18:25:23 +0000 Subject: [PATCH 11/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37834b60..c2cfbdb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## 1.0.38 -- Released [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks). Special thanks to community input in [Github Issues](https://github.com/anthropics/claude-code/issues/712) +- Released hooks. Special thanks to community input in https://github.com/anthropics/claude-code/issues/712. Docs: https://docs.anthropic.com/en/docs/claude-code/hooks ## 1.0.37 From 545d78c331eda8903d0b0777511c816638aac420 Mon Sep 17 00:00:00 2001 From: Masa1984a Date: Thu, 3 Jul 2025 06:29:38 +0900 Subject: [PATCH 12/34] Apply review suggestions: Add ValidateSet and improve documentation --- Script/run_devcontainer_claude_code.ps1 | 60 ++++++++++++------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/Script/run_devcontainer_claude_code.ps1 b/Script/run_devcontainer_claude_code.ps1 index b578a664..587cb127 100644 --- a/Script/run_devcontainer_claude_code.ps1 +++ b/Script/run_devcontainer_claude_code.ps1 @@ -1,31 +1,34 @@ -#------------------------------------------------------------------------------ -# Script: run_devcontainer_claude_code.ps1 -# Author: [Your Name or Project Name] -# Description: Automates the setup and connection to a DevContainer environment -# using either Docker or Podman on Windows. -# -# IMPORTANT USAGE REQUIREMENT: -# This script MUST be executed from the ROOT directory of your project. -# It assumes the script file itself is located in a 'Script' subdirectory. -# -# Assumed Project Structure: -# Project/ -# ├── .devcontainer/ -# └── Script/ -# └── run_devcontainer_claude_code.ps1 <-- This script's location -# -# How to Run: -# 1. Open PowerShell. -# 2. Change your current directory to the project root: -# cd c:\path\to\your\Project -# 3. Execute the script, specifying the container backend: -# .\Script\run_devcontainer_claude_code.ps1 -Backend -# -# The -Backend parameter is mandatory and accepts 'docker' or 'podman'. -#------------------------------------------------------------------------------ +<# +.SYNOPSIS + Automates the setup and connection to a DevContainer environment using either Docker or Podman on Windows. + +.DESCRIPTION + This script automates the process of initializing, starting, and connecting to a DevContainer + using either Docker or Podman as the container backend. It must be executed from the root + directory of your project and assumes the script is located in a 'Script' subdirectory. + +.PARAMETER Backend + Specifies the container backend to use. Valid values are 'docker' or 'podman'. + +.EXAMPLE + .\Script\run_devcontainer_claude_code.ps1 -Backend docker + Uses Docker as the container backend. + +.EXAMPLE + .\Script\run_devcontainer_claude_code.ps1 -Backend podman + Uses Podman as the container backend. + +.NOTES + Project Structure: + Project/ + ├── .devcontainer/ + └── Script/ + └── run_devcontainer_claude_code.ps1 +#> [CmdletBinding()] param( [Parameter(Mandatory=$true)] + [ValidateSet('docker','podman')] [string]$Backend ) @@ -33,13 +36,6 @@ param( Write-Host "--- DevContainer Startup & Connection Script ---" Write-Host "Using backend: $($Backend)" -# Validate the input backend -if ($Backend -notin @('docker', 'podman')) { - Write-Error "Invalid backend specified. Please use 'docker' or 'podman'." - Write-Host "Usage: ." + $MyInvocation.MyCommand.Definition + " -Backend " - exit 1 -} - # --- Backend-Specific Initialization --- if ($Backend -eq 'podman') { Write-Host "--- Podman Backend Initialization ---" From c93c724eeb652b77c5f231a7b3b1744b4ca9f98b Mon Sep 17 00:00:00 2001 From: Kurt Carpenter Date: Wed, 2 Jul 2025 18:06:00 -0700 Subject: [PATCH 13/34] PowerShell parameter improvements --- Script/run_devcontainer_claude_code.ps1 | 30 ++++++++++++------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/Script/run_devcontainer_claude_code.ps1 b/Script/run_devcontainer_claude_code.ps1 index 587cb127..117202cf 100644 --- a/Script/run_devcontainer_claude_code.ps1 +++ b/Script/run_devcontainer_claude_code.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Automates the setup and connection to a DevContainer environment using either Docker or Podman on Windows. @@ -25,6 +25,7 @@ └── Script/ └── run_devcontainer_claude_code.ps1 #> + [CmdletBinding()] param( [Parameter(Mandatory=$true)] @@ -43,7 +44,7 @@ if ($Backend -eq 'podman') { # --- Step 1a: Initialize Podman machine --- Write-Host "Initializing Podman machine 'claudeVM'..." try { - podman machine init claudeVM + & podman machine init claudeVM Write-Host "Podman machine 'claudeVM' initialized or already exists." } catch { Write-Error "Failed to initialize Podman machine: $($_.Exception.Message)" @@ -53,7 +54,7 @@ if ($Backend -eq 'podman') { # --- Step 1b: Start Podman machine --- Write-Host "Starting Podman machine 'claudeVM'..." try { - podman machine start claudeVM -q + & podman machine start claudeVM -q Write-Host "Podman machine started or already running." } catch { Write-Error "Failed to start Podman machine: $($_.Exception.Message)" @@ -63,7 +64,7 @@ if ($Backend -eq 'podman') { # --- Step 2: Set default connection --- Write-Host "Setting default Podman connection to 'claudeVM'..." try { - podman system connection default claudeVM + & podman system connection default claudeVM Write-Host "Default connection set." } catch { Write-Warning "Failed to set default Podman connection (may be already set or machine issue): $($_.Exception.Message)" @@ -87,11 +88,11 @@ if ($Backend -eq 'podman') { # --- Step 3: Bring up DevContainer --- Write-Host "Bringing up DevContainer in the current folder..." try { - $devcontainerUpCommand = "devcontainer up --workspace-folder ." + $arguments = @('up', '--workspace-folder', '.') if ($Backend -eq 'podman') { - $devcontainerUpCommand += " --docker-path podman" + $arguments += '--docker-path', 'podman' } - Invoke-Expression $devcontainerUpCommand + & devcontainer @arguments Write-Host "DevContainer startup process completed." } catch { Write-Error "Failed to bring up DevContainer: $($_.Exception.Message)" @@ -102,12 +103,11 @@ try { Write-Host "Finding the DevContainer ID..." $currentFolder = (Get-Location).Path -$psCommand = "$($Backend) ps --filter ""label=devcontainer.local_folder=$currentFolder"" --format ""{{.ID}}""" - try { - $containerId = $(Invoke-Expression $psCommand).Trim() + $containerId = (& $Backend ps --filter "label=devcontainer.local_folder=$currentFolder" --format '{{.ID}}').Trim() } catch { - Write-Error "Failed to get container ID (Command: $psCommand): $($_.Exception.Message)" + $displayCommand = "$Backend ps --filter `"label=devcontainer.local_folder=$currentFolder`" --format '{{.ID}}'" + Write-Error "Failed to get container ID (Command: $displayCommand): $($_.Exception.Message)" exit 1 } @@ -121,13 +121,11 @@ Write-Host "Found container ID: $containerId" # --- Step 5 & 6: Execute command and enter interactive shell inside container --- Write-Host "Executing 'claude' command and then starting zsh session inside container $($containerId)..." try { - $execCommand = "$($Backend) exec -it $containerId zsh -c 'claude; exec zsh'" - Invoke-Expression $execCommand - + & $Backend exec -it $containerId zsh -c 'claude; exec zsh' Write-Host "Interactive session ended." - } catch { - Write-Error "Failed to execute command inside container (Command: $execCommand): $($_.Exception.Message)" + $displayCommand = "$Backend exec -it $containerId zsh -c 'claude; exec zsh'" + Write-Error "Failed to execute command inside container (Command: $displayCommand): $($_.Exception.Message)" exit 1 } From 5def9264e5ea4a59383d50f58be1792c4d72bd2a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 3 Jul 2025 03:54:12 +0000 Subject: [PATCH 14/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2cfbdb7..98b2f38a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 1.0.41 + +- Hooks: Split Stop hook triggering into Stop and SubagentStop +- Hooks: Enabled optional timeout configuration for each command +- Hooks: Added "hook_event_name" to hook input +- Fixed a bug where MCP tools would display twice in tool list +- New tool parameters JSON for Bash tool in `tool_decision` event + +## 1.0.40 + +- Fixed a bug causing API connection errors with UNABLE_TO_GET_ISSUER_CERT_LOCALLY if `NODE_EXTRA_CA_CERTS` was set + +## 1.0.39 + +- New Active Time metric in OpenTelemetry logging + ## 1.0.38 - Released hooks. Special thanks to community input in https://github.com/anthropics/claude-code/issues/712. Docs: https://docs.anthropic.com/en/docs/claude-code/hooks From 397442ddf5be3593eab406478051165a0e7eae80 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 3 Jul 2025 21:09:58 +0000 Subject: [PATCH 15/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98b2f38a..84803e2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.0.43 + +- Fixed a bug where the theme selector was saving excessively + +## 1.0.42 + +- Added tilde (`~`) expansion support to `/add-dir` command + ## 1.0.41 - Hooks: Split Stop hook triggering into Stop and SubagentStop From ecaf0d818a06b1ed14ad5445dc72d04d814ea65b Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 7 Jul 2025 22:48:22 +0000 Subject: [PATCH 16/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84803e2d..b03340eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,16 @@ # Changelog +## 1.0.44 + +- New /export command lets you quickly export a conversation for sharing +- MCP: resource_link tool results are now supported +- MCP: tool annotations and tool titles now display in /mcp view +- Changed Ctrl+Z to suspend Claude Code. Resume by running `fg`. Prompt input undo is now Ctrl+U. + ## 1.0.43 - Fixed a bug where the theme selector was saving excessively +- Hooks: Added EPIPE system error handling ## 1.0.42 @@ -48,7 +56,7 @@ ## 1.0.33 - Improved logging functionality with session ID support -- Added undo functionality (Ctrl+Z and vim 'u' command) +- Added prompt input undo functionality (Ctrl+Z and vim 'u' command) - Improvements to plan mode ## 1.0.32 From a705bca81c263605160c44dd3b556b01ac66f390 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 8 Jul 2025 23:08:40 +0000 Subject: [PATCH 17/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b03340eb..5e505273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.0.45 + +- Redesigned Search (Grep) tool with new tool input parameters and features +- Disabled IDE diffs for notebook files, fixing "Timeout waiting after 1000ms" error +- Fixed config file corruption issue by enforcing atomic writes +- Updated prompt input undo to Ctrl+_ to avoid breaking existing Ctrl+U behavior, matching zsh's undo shortcut +- Stop Hooks: Fixed transcript path after /clear and fixed triggering when loop ends with tool call +- Custom slash commands: Restored namespacing in command names based on subdirectories. For example, .claude/frontend/component.md is now /frontend:component, not /component. + ## 1.0.44 - New /export command lets you quickly export a conversation for sharing From 0cbe1dcac5ab7f4670d1073f171fffb66deb9bdc Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 8 Jul 2025 23:54:58 +0000 Subject: [PATCH 18/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e505273..b03340eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,5 @@ # Changelog -## 1.0.45 - -- Redesigned Search (Grep) tool with new tool input parameters and features -- Disabled IDE diffs for notebook files, fixing "Timeout waiting after 1000ms" error -- Fixed config file corruption issue by enforcing atomic writes -- Updated prompt input undo to Ctrl+_ to avoid breaking existing Ctrl+U behavior, matching zsh's undo shortcut -- Stop Hooks: Fixed transcript path after /clear and fixed triggering when loop ends with tool call -- Custom slash commands: Restored namespacing in command names based on subdirectories. For example, .claude/frontend/component.md is now /frontend:component, not /component. - ## 1.0.44 - New /export command lets you quickly export a conversation for sharing From ff15c6f147f8b1172b77c0be04c380d33b51a170 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 10 Jul 2025 16:17:34 +0000 Subject: [PATCH 19/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b03340eb..490313c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 1.0.48 + +- Fixed a bug in v1.0.45 where the app would sometimes freeze on launch +- Added progress messages to Bash tool based on the last 5 lines of command output +- Added expanding variables support for MCP server configuration +- Moved shell snapshots from /tmp to ~/.claude for more reliable Bash tool calls +- Improved IDE extension path handling when Claude Code runs in WSL +- Hooks: Added a PreCompact hook +- Vim mode: Added c, f/F, t/T + +## 1.0.45 + +- Redesigned Search (Grep) tool with new tool input parameters and features +- Disabled IDE diffs for notebook files, fixing "Timeout waiting after 1000ms" error +- Fixed config file corruption issue by enforcing atomic writes +- Updated prompt input undo to Ctrl+\_ to avoid breaking existing Ctrl+U behavior, matching zsh's undo shortcut +- Stop Hooks: Fixed transcript path after /clear and fixed triggering when loop ends with tool call +- Custom slash commands: Restored namespacing in command names based on subdirectories. For example, .claude/frontend/component.md is now /frontend:component, not /component. + ## 1.0.44 - New /export command lets you quickly export a conversation for sharing From 33e37bd828fb9fb584e3bc10ff409ce9c513e52b Mon Sep 17 00:00:00 2001 From: David Dworken Date: Thu, 10 Jul 2025 15:13:18 -0700 Subject: [PATCH 20/34] Fix devcontainer volume security vulnerability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use ${devcontainerId} variable to create project-specific volumes, preventing cross-container data access. This addresses the security issue where multiple containers could share sensitive data through named volumes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 58513062..ca703862 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -38,8 +38,8 @@ }, "remoteUser": "node", "mounts": [ - "source=claude-code-bashhistory,target=/commandhistory,type=volume", - "source=claude-code-config,target=/home/node/.claude,type=volume" + "source=claude-code-bashhistory-${devcontainerId},target=/commandhistory,type=volume", + "source=claude-code-config-${devcontainerId},target=/home/node/.claude,type=volume" ], "remoteEnv": { "NODE_OPTIONS": "--max-old-space-size=4096", From f91aed5440fabdd7b74ba4dc6e7069920486eed5 Mon Sep 17 00:00:00 2001 From: toms74209200 Date: Fri, 11 Jul 2025 22:51:14 +0900 Subject: [PATCH 21/34] Improve devcontainer Dockerfile following best practices - Use apt-get instead of apt for better script compatibility - Add --no-install-recommends to reduce image size - Add cleanup to remove apt cache - Parameterize external tool versions with build args --- .devcontainer/Dockerfile | 16 ++++++++++------ .devcontainer/devcontainer.json | 4 +++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 04fffd16..29599d87 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -4,7 +4,8 @@ ARG TZ ENV TZ="$TZ" # Install basic development tools and iptables/ipset -RUN apt update && apt install -y less \ +RUN apt-get update && apt-get install -y --no-install-recommends \ + less \ git \ procps \ sudo \ @@ -19,7 +20,8 @@ RUN apt update && apt install -y less \ iproute2 \ dnsutils \ aggregate \ - jq + jq \ + && apt-get clean && rm -rf /var/lib/apt/lists/* # Ensure default node user has access to /usr/local/share RUN mkdir -p /usr/local/share/npm-global && \ @@ -42,10 +44,11 @@ RUN mkdir -p /workspace /home/node/.claude && \ WORKDIR /workspace +ARG GIT_DELTA_VERSION=0.18.2 RUN ARCH=$(dpkg --print-architecture) && \ - wget "https://github.com/dandavison/delta/releases/download/0.18.2/git-delta_0.18.2_${ARCH}.deb" && \ - sudo dpkg -i "git-delta_0.18.2_${ARCH}.deb" && \ - rm "git-delta_0.18.2_${ARCH}.deb" + wget "https://github.com/dandavison/delta/releases/download/${GIT_DELTA_VERSION}/git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" && \ + sudo dpkg -i "git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" && \ + rm "git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" # Set up non-root user USER node @@ -58,7 +61,8 @@ ENV PATH=$PATH:/usr/local/share/npm-global/bin ENV SHELL=/bin/zsh # Default powerline10k theme -RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.0/zsh-in-docker.sh)" -- \ +ARG ZSH_IN_DOCKER_VERSION=1.2.0 +RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v${ZSH_IN_DOCKER_VERSION}/zsh-in-docker.sh)" -- \ -p git \ -p fzf \ -a "source /usr/share/doc/fzf/examples/key-bindings.zsh" \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ca703862..b1ccf4b9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,9 @@ "build": { "dockerfile": "Dockerfile", "args": { - "TZ": "${localEnv:TZ:America/Los_Angeles}" + "TZ": "${localEnv:TZ:America/Los_Angeles}", + "GIT_DELTA_VERSION": "0.18.2", + "ZSH_IN_DOCKER_VERSION": "1.2.0" } }, "runArgs": [ From d45bce242d8ac7ff13a2bab2e619558ab5f47dec Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 11 Jul 2025 22:54:23 +0000 Subject: [PATCH 22/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 490313c1..6a1014a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 1.0.51 + +- Added support for native Windows (requires Git for Windows) +- Added support for Bedrock API keys through environment variable AWS_BEARER_TOKEN_BEDROCK +- Settings: /doctor can now help you identify and fix invalid setting files +- `--append-system-prompt` can now be used in interactive mode, not just --print/-p. +- Increased auto-compact warning threshold from 60% to 80% +- Fixed an issue with handling user directories with spaces for shell snapshots +- OTEL resource now includes os.type, os.version, host.arch, and wsl.version (if running on Windows Subsystem for Linux) +- Custom slash commands: Fixed user-level commands in subdirectories +- Plan mode: Fixed issue where rejected plan from sub-task would get discarded + ## 1.0.48 - Fixed a bug in v1.0.45 where the app would sometimes freeze on launch @@ -17,7 +29,7 @@ - Fixed config file corruption issue by enforcing atomic writes - Updated prompt input undo to Ctrl+\_ to avoid breaking existing Ctrl+U behavior, matching zsh's undo shortcut - Stop Hooks: Fixed transcript path after /clear and fixed triggering when loop ends with tool call -- Custom slash commands: Restored namespacing in command names based on subdirectories. For example, .claude/frontend/component.md is now /frontend:component, not /component. +- Custom slash commands: Restored namespacing in command names based on subdirectories. For example, .claude/commands/frontend/component.md is now /frontend:component, not /component. ## 1.0.44 From 90c26533d185a99ac87f42d17d9e945c898cf50f Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 16 Jul 2025 23:50:28 +0000 Subject: [PATCH 23/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a1014a0..df2e3904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## 1.0.54 + +- Hooks: Added UserPromptSubmit hook and the current working directory to hook inputs +- Custom slash commands: Added argument-hint to frontmatter +- Windows: OAuth uses port 45454 and properly constructs browser URL +- Windows: mode switching now uses alt + m, and plan mode renders properly +- Shell: Switch to in-memory shell snapshot to file-related errors + +## 1.0.53 + +- Updated @-mention file truncation from 100 lines to 2000 lines +- Add helper script settings for AWS token refresh: awsAuthRefresh (for foreground operations like aws sso login) and awsCredentialExport (for background operation with STS-like response). + +## 1.0.52 + +- Added support for MCP server instructions + ## 1.0.51 - Added support for native Windows (requires Git for Windows) From 9285dfbf2f093c0071798a237ed102a513544a14 Mon Sep 17 00:00:00 2001 From: keitosuwahara Date: Thu, 17 Jul 2025 13:05:39 +0900 Subject: [PATCH 24/34] Addition of check for presence of required commands --- Script/run_devcontainer_claude_code.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Script/run_devcontainer_claude_code.ps1 b/Script/run_devcontainer_claude_code.ps1 index 117202cf..5b99d7d8 100644 --- a/Script/run_devcontainer_claude_code.ps1 +++ b/Script/run_devcontainer_claude_code.ps1 @@ -37,6 +37,21 @@ param( Write-Host "--- DevContainer Startup & Connection Script ---" Write-Host "Using backend: $($Backend)" +# --- Prerequisite Check --- +Write-Host "Checking for required commands..." +try { + Get-Command $Backend -ErrorAction Stop | Out-Null + Write-Host "- $($Backend) command found." + Get-Command devcontainer -ErrorAction Stop | Out-Null + Write-Host "- devcontainer command found." +} +catch { + Write-Error "A required command is not installed or not in your PATH." + Write-Error "Please ensure '$($_.Exception.Message.Split(':')[0])' and 'devcontainer' are installed and accessible." + exit 1 +} + + # --- Backend-Specific Initialization --- if ($Backend -eq 'podman') { Write-Host "--- Podman Backend Initialization ---" From 68d43db2a0688d0579bb2b1a50db45bc856a4fca Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 17 Jul 2025 22:39:14 +0000 Subject: [PATCH 25/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df2e3904..45796efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Custom slash commands: Added argument-hint to frontmatter - Windows: OAuth uses port 45454 and properly constructs browser URL - Windows: mode switching now uses alt + m, and plan mode renders properly -- Shell: Switch to in-memory shell snapshot to file-related errors +- Shell: Switch to in-memory shell snapshot to fix file-related errors ## 1.0.53 From 486b3057085dfef8df30bc8a407d7ed8cb4e3894 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 18 Jul 2025 16:41:25 +0000 Subject: [PATCH 26/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45796efd..6a1014a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,5 @@ # Changelog -## 1.0.54 - -- Hooks: Added UserPromptSubmit hook and the current working directory to hook inputs -- Custom slash commands: Added argument-hint to frontmatter -- Windows: OAuth uses port 45454 and properly constructs browser URL -- Windows: mode switching now uses alt + m, and plan mode renders properly -- Shell: Switch to in-memory shell snapshot to fix file-related errors - -## 1.0.53 - -- Updated @-mention file truncation from 100 lines to 2000 lines -- Add helper script settings for AWS token refresh: awsAuthRefresh (for foreground operations like aws sso login) and awsCredentialExport (for background operation with STS-like response). - -## 1.0.52 - -- Added support for MCP server instructions - ## 1.0.51 - Added support for native Windows (requires Git for Windows) From b328530abdc2e47faa0153d2a642de9bd9b986c6 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 18 Jul 2025 20:30:50 +0000 Subject: [PATCH 27/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a1014a0..2980a9fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.0.53 + +- Updated @-mention file truncation from 100 lines to 2000 lines +- Add helper script settings for AWS token refresh: awsAuthRefresh (for foreground operations like aws sso login) and awsCredentialExport (for background operation with STS-like response). + +## 1.0.52 + +- Added support for MCP server instructions + ## 1.0.51 - Added support for native Windows (requires Git for Windows) From 4c056f7a09bce072f2f774c4dda8f0084e45d0fe Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 19 Jul 2025 00:06:08 +0000 Subject: [PATCH 28/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2980a9fa..45796efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.0.54 + +- Hooks: Added UserPromptSubmit hook and the current working directory to hook inputs +- Custom slash commands: Added argument-hint to frontmatter +- Windows: OAuth uses port 45454 and properly constructs browser URL +- Windows: mode switching now uses alt + m, and plan mode renders properly +- Shell: Switch to in-memory shell snapshot to fix file-related errors + ## 1.0.53 - Updated @-mention file truncation from 100 lines to 2000 lines From c8207b4f687aadc5ef761c99a95819bde5388e91 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 23 Jul 2025 21:17:14 +0000 Subject: [PATCH 29/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45796efd..8e4e5da8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 1.0.58 + +- Added support for reading PDFs +- MCP: Improved server health status display in 'claude mcp list' +- Hooks: Added CLAUDE_PROJECT_DIR env var for hook commands + +## 1.0.57 + +- Added support for specifying a model in slash commands +- Improved permission messages to help Claude understand allowed tools +- Fix: Remove trailing newlines from bash output in terminal wrapping + +## 1.0.56 + +- Windows: Enabled shift+tab for mode switching on versions of Node.js that support terminal VT mode +- Fixes for WSL IDE detection +- Fix an issue causing awsRefreshHelper changes to .aws directory not to be picked up + +## 1.0.55 + +- Clarified knowledge cutoff for Opus 4 and Sonnet 4 models +- Windows: fixed Ctrl+Z crash +- SDK: Added ability to capture error logging +- Add --system-prompt-file option to override system prompt in print mode + ## 1.0.54 - Hooks: Added UserPromptSubmit hook and the current working directory to hook inputs From e0d79c35712981915945f61eab255e85c6e0cd3f Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 23 Jul 2025 21:21:28 +0000 Subject: [PATCH 30/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e4e5da8..e8faa662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.0.59 + +- Rename CLAUDE_CODE_BASH_PREFIX to CLAUDE_CODE_SHELL_PREFIX +- SDK: Added tool confirmation support with canUseTool callback +- SDK: Allow specifying env for spawned process +- Hooks: Exposed PermissionDecision to hooks (including "ask") +- Hooks: UserPromptSubmit now supports additionalContext in advanced JSON output +- Fixed issue where some Max users that specified Opus would still see fallback to Sonnet + ## 1.0.58 - Added support for reading PDFs From 812c27b8b35ff3a520764c0f0aa75b61ad512489 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 24 Jul 2025 21:01:31 +0000 Subject: [PATCH 31/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8faa662..98472a3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.0.60 + +- You can now create custom subagents for specialized tasks! Run /agents to get started + ## 1.0.59 - Rename CLAUDE_CODE_BASH_PREFIX to CLAUDE_CODE_SHELL_PREFIX From 55219b8b4e612b5fc6a85f7dc4eb4382ec4134eb Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 25 Jul 2025 21:06:44 +0000 Subject: [PATCH 32/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98472a3c..a61acdd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.0.61 + +- Added --settings flag to load settings from a JSON file + ## 1.0.60 - You can now create custom subagents for specialized tasks! Run /agents to get started From b48dfb8e8761f3d186518af32b89eb307e0d3113 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 28 Jul 2025 18:35:03 +0000 Subject: [PATCH 33/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a61acdd9..81f68260 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,14 @@ ## 1.0.61 -- Added --settings flag to load settings from a JSON file +- Transcript mode (Ctrl+R): Changed Esc to exit transcript mode rather than interrupt +- Settings: Added `--settings` flag to load settings from a JSON file +- Settings: Fixed resolution of settings files paths that are symlinks +- OTEL: Fixed reporting of wrong organization after authentication changes +- Slash commands: Fixed permissions checking for allowed-tools with Bash +- IDE: Added support for pasting images in VSCode MacOS using ⌘+V +- IDE: Added `CLAUDE_CODE_AUTO_CONNECT_IDE=false` for disabling IDE auto-connection +- Added `CLAUDE_CODE_SHELL_PREFIX` for wrapping Claude and user-provided shell commands run by Claude Code ## 1.0.60 @@ -10,7 +17,6 @@ ## 1.0.59 -- Rename CLAUDE_CODE_BASH_PREFIX to CLAUDE_CODE_SHELL_PREFIX - SDK: Added tool confirmation support with canUseTool callback - SDK: Allow specifying env for spawned process - Hooks: Exposed PermissionDecision to hooks (including "ask") From 8ad36c459cc33f048901e34b8c2db3e00d3926e0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 28 Jul 2025 22:35:41 +0000 Subject: [PATCH 34/34] chore: Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81f68260..da15b50b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 1.0.62 + +- Added @-mention support with typeahead for custom agents. @ to invoke it +- Hooks: Added SessionStart hook for new session initialization +- /add-dir command now supports typeahead for directory paths +- Improved network connectivity check reliability + ## 1.0.61 - Transcript mode (Ctrl+R): Changed Esc to exit transcript mode rather than interrupt