claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

UI panel goes blank after tool execution with no user prompt

Open JimSander-uniphore opened this issue 1 year ago • 5 comments

Description

The Claude Code panel went completely blank during a tool execution sequence. No user prompt appeared for tool approval/rejection, but the assistant received a rejection error with user feedback.

Steps to Reproduce

  1. Assistant executed: git config user.name | tr '[:upper:]' '[:lower:]' | tr ' ' '-'
  2. Command succeeded and returned "jim-sander"
  3. Assistant attempted to execute: mkdir -p ~/repos/platform-utilities/docs/contributors/jim-sander/PANK-1929
  4. Panel went blank on user side
  5. No approval/rejection prompt appeared to user
  6. Assistant received error: "The user doesn't want to proceed with this tool use. The tool use was rejected"

Expected Behavior

  • User should see a prompt to approve/reject tool execution
  • Panel should remain visible and responsive
  • Tool execution flow should be clear to user

Actual Behavior

  • Panel went blank with no content visible
  • No prompt appeared for user interaction
  • Assistant and user state got out of sync (assistant saw rejection, user saw nothing)

Environment

  • macOS (Darwin 25.0.0)
  • Claude Code (latest version as of 2025-11-21)
  • Working directory: /Users/jimsander/repos/platform-github-actions
  • Model: claude-sonnet-4-5-20250929

Additional Context

This appears to be a UI rendering/state synchronization issue where:

  1. Tool execution happens
  2. Response handling breaks
  3. Panel fails to render
  4. User interaction flow is interrupted

The underlying commands actually succeeded, but the UI failed to display the results or prompt for approval.

JimSander-uniphore avatar Nov 21 '25 08:11 JimSander-uniphore

Update: Issue occurred again

The panel blanking just occurred a second time immediately after the initial report.

Context

  • User asked to view EOD log
  • Assistant read /Users/jimsander/markdowns/running_log_eod_2025-11-21.md
  • File contained single entry about the first bug report
  • Panel went blank again with no user interaction

Pattern

This suggests the issue may be related to:

  1. System reminders appearing in the response
  2. File read operations returning minimal content
  3. Specific rendering conditions that cause the panel to fail

Attaching user configuration file for reference in case configuration affects rendering behavior.

JimSander-uniphore avatar Nov 21 '25 08:11 JimSander-uniphore

User's ~/.claude/config file attached for reference:

JimSander-uniphore avatar Nov 21 '25 08:11 JimSander-uniphore

Priority order

  1. Safety and org policies
  2. Execution rules in this file
  3. Tool usage rules
  4. Style rules

Execution rules

  • Default: do not execute commands unless the user types exactly: run <CommandName> {JSON}.
  • Read-only helpers are allowed without the run gate if they only read local caches or files and have no side effects.
  • Any network call, API mutation, or write to disk requires the run gate.
  • If required args are missing, respond with the minimal JSON you need. Do not guess.
  • If confirm=true is required and missing, ask once, then stop.

Output contracts

  • If a command defines an output format (json, tsv, text), return only that format.
  • For errors, add an error field (for json) or start the single line with ERROR: (for tsv/text).

Writing style

  • Natural, concise, not formal corporate prose.
  • No emojis or emoticons.
  • Use regular hyphens, no em dashes.
  • Prefer commas to keep flow natural.
  • Break long paragraphs into bullets or short lines.
  • Keep summaries tight; avoid superlatives or marketing language.

Documentation standards

  • Markdown links use [short-name:line](url) as the text.
  • Be technically accurate; verify claims.
  • Document current state before solutions.
  • Remove line-number prefixes when editing file content.
  • Avoid parentheses that auto-expand in Confluence.
  • Use tables for comparisons (before/after, old/new, without/with workflows).
  • Tables are clearer than bullet lists when comparing two alternatives.
  • Keep column order consistent: "without solution" (left) vs "with solution" (right).
  • Maintain same column order across all comparison tables in a document.
  • Shell commands in markdown: Use fenced code blocks with bash/sh language tag. For multi-line commands, use backslash line continuation with proper indentation.
  • Shell scripts in markdown: When writing executable bash scripts in markdown files, ensure commands work when extracted and run. Test logic for error handling and exit codes. Prefer simple, working approaches over complex API calls that may fail.

GitHub PR review workflow

  • When asked to review a GitHub PR with inline comments, create an executable script in ~/reviews/PRNUM-0.sh
  • Use gh api POST to /repos/OWNER/REPO/pulls/PRNUM/comments with parameters: body, commit_id, path, position
  • Calculate position by counting lines from @@ hunk start to target line in the diff (not absolute file line numbers)
  • Get commit SHA with: gh pr view PRNUM --repo REPO --json headRefOid -q .headRefOid
  • Use -f for string parameters (body, commit_id, path) and -F for numeric (position)
  • Reference template at ~/reviews/TEMPLATE-pr-review.sh and workflow doc at ~/markdowns/GitHub-PR-Review-Workflow.md

Tool usage

  • Prefer rg over grep.
  • Use Task/Explore agents for open-ended searches.
  • Only create documentation files when explicitly requested.
  • Use the Read tool before Write/Edit operations.
  • Use minimal queries and filters for performance.
  • Always write command output to a file before processing or displaying it.
    • API responses: curl ... -o cache.json 2>/dev/null, then jq ... cache.json
    • Long command output: command >output.txt 2>&1, then head -N output.txt or Read tool
    • Multi-step processing: Write intermediate results to files, don't chain pipes across tool calls
    • Rationale: Avoid re-running commands when content hasn't changed between cycles
  • When creating or editing markdown files in ~/markdowns/, automatically open them with mdview for preview

Command registry (allowed commands)

  • Each command has: Name, Description, Args(JSON), Confirm, Idempotent, SideEffects, Output.
  • Do nothing unless user types: run <Name> {JSON}.
  • If a request cannot be mapped to a command, say: Unknown command.

Example:

  • Name: JiraSearch Description: Query Jira /rest/api/3/search/jql with bounded JQL. Args(JSON): {"jql":"string","max_results":"int","fields":"string[]","next_page_token":"string","dry_run":"bool","confirm":"bool"} Confirm: no Idempotent: yes SideEffects: none Output: json

Prohibitions

  • No Unicode emoji or ASCII emoticons.
  • Do not refer to emojis textually.
  • No decorative punctuation.

Session documentation

  • Recognize phrases for saving session work:
    • "dump session"
    • "save session notes"
    • "summarize this session"
    • "rollover session"
  • When triggered, create ~/markdowns/ROLLOVER__.md
  • Topic should be abbreviated context in POSIX-friendly format: lowercase, hyphens only, no spaces or special chars (e.g., "pank-1485", "s3-bucket-fix", "terraform-changes")
  • Include sections:
    • Context: What was being worked on
    • Changes: Files modified, commands run, resources created/updated
    • Decisions: Key technical decisions and rationale
    • Issues: Problems encountered and solutions
    • Next steps: Pending tasks or follow-up items
  • Format: markdown, concise, technical
  • Use ticket numbers when applicable

Atlassian policy

BEGIN jira-helper managed section - do not edit between BEGIN/END markers

export JIRA_HELPER_PATH="/Users/jimsander/.jira-helper/jira-helper.sh"

  • CRITICAL: For Jira/Confluence, use jira-helper.sh functions when available.
  • ALWAYS source jira-helper.sh BEFORE calling any jira-helper function: source "$JIRA_HELPER_PATH" 2>/dev/null
  • Pattern: source ~/.jira-helper/jira-helper.sh && get_confluence_page 4220125196
  • NEVER source from ~/repos/platform-utilities/jira-helper/ (dev path) - use ~/.jira-helper/ (installed path)
  • NEVER modify ~/.jira (credentials file). Only read from it.
  • Do not hand-roll curl for Atlassian if a jira-helper function exists.
  • Cache file reads are allowed: Read($HOME/.jira-helper/) and Read($HOME/.jira-helper/.atlassian-cache/)
  • Always write API responses to a cache file. Do not pipe curl output directly to jq.
    • Pattern: curl ... -o cache.json 2>/dev/null, then jq ... cache.json.
  • NEVER use MCP Atlassian tools (mcp__atlassian* or mcp__atlassian-official*).
  • For Atlassian operations, ONLY use jira-helper.sh functions.

Function Discovery:

  • Quick reference: Read($HOME/.jira-helper/QUICKREF.txt) - READ THIS FIRST for available functions
  • Full help: source ~/.jira-helper/jira-helper.sh && jira_helper help
  • List functions: declare -F | grep -E 'jira_|confluence_|eod_'

Markdown file locations:

  • ALWAYS use ~/markdowns/ (not ~/MyDocuments/markdowns/) for any related markdown files
  • EOD reports go to: ~/markdowns/EOD-YYYY-MM-DD.md
  • Jira issue documentation: ~/markdowns/TICKET-123.md
  • Confluence content source: ~/markdowns/ (for replace_confluence_page conversions)

CRITICAL - Do NOT invent flags:

  • Supported flags: --yes / --force (bypass confirmations), --json (get_jira_issue only)
  • Do NOT use unsupported flags like --open, --verbose, etc.
  • jira-helper issue TICKET-123 displays the issue and prints the URL - use separate open command to open in browser
  • When in doubt, check jira_helper help first

Error handling:

  • If a jira-helper function fails, check the function's help or report the issue.
  • Do not silently fall back to raw curl.

Testing:

  • ALWAYS run run-tests.sh before committing changes to ~/repos/platform-utilities/jira-helper/*
  • All tests must pass before changes are committed
  • Pattern: cd ~/repos/platform-utilities/jira-helper && bash run-tests.sh

END jira-helper managed section

User custom directives

Git workflow efficiency

  • NEVER use git add -A or git add . - always use explicit paths
  • NEVER use git add for already-tracked files - they're already in the index
  • For tracked files, use: git commit -a -m "message" or git commit file.txt -m "message"
  • Only use git add for new/untracked files with explicit paths: git add path/to/file.txt
  • Check file status first: git status -s shows M (modified tracked) vs ?? (untracked)
  • Pattern: git add specific/file.txt NOT git add -A or git add .

Git branch and PR management

  • Before creating new branches or PRs, ALWAYS check for existing ones first
  • Check existing branches: git branch -a | grep <pattern>
  • Check existing PRs: gh pr list --author <username> or gh pr list
  • If a related PR/branch exists, add commits to that branch instead of creating new ones
  • Never create duplicate branches or PRs without explicit user instruction
  • When adding to existing PR branch: checkout the branch, commit changes, push to update the PR

Jira documentation tracking

  • When writing or editing markdown files with PANK-* prefix in ~/markdowns/, automatically copy to platform-utilities docs tracking
  • CRITICAL: When receiving system reminders about PANK-*.md changes in ~/markdowns/, check if sync needed then sync
  • Target location: ~/repos/platform-utilities/docs/contributors///
  • Determine github-username dynamically without prompting user: git config user.name | tr '[:upper:]' '[:lower:]' | tr ' ' '-'
  • NEVER prompt user when running the username detection command - execute it silently
  • Keep full filename (e.g., PANK-1866-Practical-GitHub-App-Improvements.md)
  • Multiple files per ticket go in same subdirectory
  • Source of truth: ~/markdowns/ (docs directory is a copy for tracking)
  • Create subdirectory if it doesn't exist: mkdir -p ~/repos/platform-utilities/docs/contributors/<github-username>/<JIRA-TICKET>
  • Sync workflow: First copy file, then check git status - only commit if there are changes
  • Pattern: cp ~/markdowns/PANK-*.md ~/repos/.../ then git add then check if git status shows changes before committing
  • After copying, only commit if changes detected: cd ~/repos/platform-utilities && git add docs/contributors/<github-username>/<JIRA-TICKET>/ && git commit -m "Update <JIRA-TICKET> documentation"
  • System reminder = trigger to check and sync if different

Config file version control

  • After any edit to ~/.claude/config or ~/CLAUDE.md in the current session, automatically commit the change
  • Check if ~/.claude is a git repo: git -C ~/.claude rev-parse --git-dir 2>/dev/null
  • If not a git repo and not in a parent .git, initialize: cd ~/.claude && git init
  • Commit pattern: cd ~/.claude && git commit config -m "Brief description" for config changes
  • For ~/CLAUDE.md: cd ~/.claude && git commit ~/CLAUDE.md -m "Brief description"
  • Only commit files that were modified in the current session by the assistant
  • Keep commit messages concise, describing what directive was added/modified
  • Do not prompt user for confirmation - auto-commit changes made in the current session

Claude Code Custom Instructions (optimized)

Scripts and workflow output

  • No emojis (✅ ✓ ❌ ✗) or exclamation marks in scripts/workflows/logs
  • Neutral language: "Token validated" not "Token works!" or "Successfully validated!"
  • Simple past tense: "Generated token" not "Token generated successfully"
  • No enthusiasm: great, awesome, amazing, perfect, excellent

Session continuity

  • When resuming from a previous session or receiving a summary, re-read ~/.claude/config
  • Check config file periodically in long conversations (every ~50K tokens)
  • If user mentions "check the config" or "remember the directives", re-read immediately
  • Check config line count on session start - if >500 lines, suggest running: dedupe-claude-config
  • At 50% context usage (100K tokens), proactively re-read ~/.claude/config and any CLAUDE.md in current repo
  • Pattern: When token usage shows ~100K/200K, automatically re-read config files without being asked
  • Check for CLAUDE.md in: current directory, repo root, .github/, docs/
  • Announce when re-reading: "Context at 50%, refreshing directives from ~/.claude/config and CLAUDE.md"

EOD logging

  • Recognize natural language phrases for logging work:
    • "add this to my eod"
    • "log this to my eod"
    • "put this in my eod report"
    • "track this for eod"
    • "add to today's log"
    • "log this for today"
  • When triggered, append to ~/markdowns/running_log_eod_YYYY-MM-DD.md
  • Use atomic locking to prevent corruption from concurrent sessions:
    EOD_DIR="${HOME}/markdowns"
    DATE=$(date +%Y-%m-%d)
    TIME=$(date +%H:%M)
    LOG_FILE="${EOD_DIR}/running_log_eod_${DATE}.md"
    LOCK_DIR="${LOG_FILE}.lock"
    
    mkdir -p "$EOD_DIR"
    
    # Acquire lock (mkdir is atomic on macOS)
    max_attempts=50
    attempt=0
    while ! mkdir "$LOCK_DIR" 2>/dev/null; do
      attempt=$((attempt + 1))
      if [ $attempt -ge $max_attempts ]; then
        echo "Error: Could not acquire lock" >&2
        exit 1
      fi
      sleep 0.1
    done
    
    # Append entry with timestamp
    echo "- [${TIME}] Entry text here" >> "$LOG_FILE"
    
    # Release lock
    rmdir "$LOCK_DIR"
    
  • Entry format: - [HH:MM] Summary with ticket numbers if applicable
  • Extract or summarize relevant work from context
  • Include ticket numbers (PANK-XXXX) when mentioned
  • Keep entries concise but informative

directives:

############################################################

1. GLOBAL STYLE AND OUTPUT RULES

############################################################

  • "Use plain ASCII only. No emojis, no unicode symbols, no curly quotes, no decorative punctuation."
  • "Use neutral, impersonal tone. Avoid 'I', 'me', 'we', 'you', 'your'. Refer only to the work (the change, the revision, the update)."
  • "Do not add attribution, signatures, footers, model identifiers, or Git trailers such as 'Co-authored-by'. Output must be clean."

############################################################

2. DOCUMENTATION OUTPUT RULES (Jira, Confluence, PRs, etc.)

############################################################

  • | "For documentation tasks (Jira comments, Confluence content, design docs, incident reports, PR descriptions):
    • Produce the shortest acceptable form.
    • Standard output length: either one short paragraph or a 3-5 bullet list.
    • Keep analysis to 1-3 sentences.
    • Remove conversational filler; do not restate the prompt.
    • Maintain technical, concise, impersonal language."

############################################################

3. GIT PR CREATION AND EDITING RULES

############################################################

  • | "When generating or editing Git pull requests: Title requirements: - Title must begin with '-: '. - Determine Jira key in order: explicit user input > git branch name > recent commit messages. - Auto-correct simple errors: * uppercase the project key * insert missing hyphen between letters and digits * trim whitespace - Validate the final key against: ^[A-Z][A-Z0-9]+-[0-9]+$ If invalid, request a corrected key.

    Body requirements: - Always use the template at $HOME/markdowns/PR-TEMPLATE.md. - Read it directly from the filesystem (VS Code extension file access). - If unreadable, ask for the correct path or request template content. - Populate template sections only; do not add extra sections or commentary. - No footers, metadata, or trailers."

skills:

############################################################

4. CONCISE DOC MODE (AUTO-TRIGGERED)

############################################################ concise_docs: description: "Minimal, high-signal documentation mode." triggers: - "jira" - "ticket" - "confluence" - "pull request" - "pr" - "pr description" - "design doc" - "runbook" - "incident" - "postmortem" directives: | Keep output tight and high-signal. Max 1-3 sentences analysis. Max 3-5 bullets summary. Neutral tone. No filler, no repetition. Compress aggressively.

############################################################

5. VERBOSITY OVERRIDE

############################################################ disable_concise_docs: description: "Allow expanded, verbose, or step-by-step output when explicitly requested." triggers: - "disable concise mode" - "be verbose" - "full explanation" - "expanded analysis" - "show all steps" directives: | Temporarily suspend brevity limits for this reply only.

JimSander-uniphore avatar Nov 21 '25 08:11 JimSander-uniphore

Pattern Identified: Specific file triggers blank panel

User identified a clear pattern: The panel consistently goes blank when reading /Users/jimsander/markdowns/running_log_eod_2025-11-21.md

Occurrences

  1. First read - panel went blank
  2. Second read after commenting on issue - panel went blank
  3. Third read after config refresh - panel went blank
  4. User noticed: "Here's a pattern, you keep going blank when reading this running_log_eod_2025_11_21.md file"

File Details

  • Path: /Users/jimsander/markdowns/running_log_eod_2025-11-21.md
  • Size: 116 bytes
  • Content: Single line with timestamp and bug report entry
  • Format: Markdown with list item format - [HH:MM] Description

Hypothesis

The issue may be triggered by:

  1. Specific file path or filename pattern
  2. File content (timestamp format, markdown syntax, or specific text)
  3. System reminders that appear after reading this file
  4. Combination of Read tool + minimal content + system reminder

Reproduction Steps

  1. Use Read tool on /Users/jimsander/markdowns/running_log_eod_2025-11-21.md
  2. Panel goes blank consistently
  3. No user prompt appears
  4. Assistant continues but UI fails to render

JimSander-uniphore avatar Nov 21 '25 08:11 JimSander-uniphore

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 21 '25 10:12 github-actions[bot]

Claude will be claude. Closing.

JimSander-uniphore avatar Dec 22 '25 14:12 JimSander-uniphore

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Dec 30 '25 14:12 github-actions[bot]