Suggested prompts referencing file paths are not validated before display

Status Closed — not planned
Maintainer reply None cached
Activity 1 comment · opened Jun 17, 2026 · closed Jul 29, 2026

Summary

Claude Code's suggested-prompt feature generates follow-up prompts for the user to click and accept. When a suggested prompt contains a file path (e.g., \Please read and follow the directions in /home/user/_Prompts_SPARC.txt\), the path is not validated against the filesystem before the suggestion is displayed.

Steps to Reproduce

  1. Run a Claude Code session in which you repeatedly ask Claude to read prompt files (e.g., \Please read and follow the directions in /home/ccaitwo/_Prompts_Privacy.txt\).
  2. Claude Code learns the pattern and auto-generates a suggested follow-up prompt referencing a new prompt file.
  3. The suggested prompt references a file that does not exist (e.g., \/home/ccaitwo/_Prompts_SPARC.txt\).
  4. If the user clicks the suggestion and presses Enter, the session attempts to read a non-existent file.

Expected Behavior

Suggested prompts that contain file paths should be validated against the filesystem before being surfaced to the user. If the file does not exist, the suggestion should either be suppressed or display a warning (e.g., "file not found — create it first?").

Actual Behavior

The suggestion is displayed without any validation. Accepting it causes a file-not-found error with no prior warning to the user.

Impact

A user who trusts the suggestion and presses Enter without inspecting the path gets an error and potentially a broken session state. The user has no way to know in advance that the suggested prompt is invalid.

Environment

  • Claude Code CLI
  • GitHub account: ai-university-aiu
  • Reported by: D. R. Dison, Founder of AIU (Artificial Intelligence University), Creator of PrologAI and Mentova

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗