[FEATURE] Add intent comments inside generated scripts before execution

Resolved 💬 1 comment Opened Jun 9, 2026 by pablo-inchausti-caylent Closed Jul 16, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When Claude generates a script to run — for example, to test API calls or interact with MCP servers — it asks the user for approval before executing it. For simple commands this is usually fine, but for longer scripts that include credentials, external APIs, or the filesystem, understanding what the code actually does can require a non-trivial amount of review.

This becomes even more challenging in agentic workflows, where Claude may generate and execute many scripts in succession, making it difficult for users to keep track of the intent and impact of each one.

Proposed Solution

It would be valuable to include a short intent summary alongside the execution request, explaining what the script is trying to do, along with some hints about potential impact, system modifications, side effects, or costs associated with running it.

Alternative Solutions

Claude could add a short comment at the top of each generated script describing what it does, what it touches, and whether it makes any changes or has any costs

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

Use case:

A user asks whether a particular AWS service or configuration will work for their workload. To validate the answer, Claude generates a script that uses the user’s approved AWS credentials to deploy and test the configuration in a real AWS account.

For example, the script may create an EC2 instance, install software, run a benchmark, collect the results, and then terminate the instance. While this may be the most reliable way to answer the question, it also creates cloud resources and may incur AWS charges.

In this scenario, the execution request could include an intent summary such as: “Create a temporary EC2 instance, run a benchmark, collect results, and terminate the instance. Estimated runtime: 15 minutes. Potential impact: EC2 usage charges and temporary resource creation.”

Additional Context

I didn't see this feature in another tool, I was a simple need of it

The following screenshot shows a simple way to implement that, giving to the user at least, a little context about the code that is request to approve

<img width="873" height="878" alt="Image" src="https://github.com/user-attachments/assets/d12abfb9-567b-4453-852f-8a686a57c110" />

View original on GitHub ↗

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