Skip to content

Be explicit about accessing state in ways that are token efficient. - #76

Open
andybaran wants to merge 2 commits into
hashicorp:mainfrom
andybaran:main
Open

Be explicit about accessing state in ways that are token efficient.#76
andybaran wants to merge 2 commits into
hashicorp:mainfrom
andybaran:main

Conversation

@andybaran

Copy link
Copy Markdown

We currently do not provide explicit guidance to agents guiding them on how to access Terraform state. State files stored on disk and returned via HCP TF/TFE API's are in the pretty-printed JSON where-as those returned via terraform show -json are compact JSON. Reading compact JSON uses ~ 15% fewer tokens than pretty-printed JSON as it does away with whitespace and other formatting considerations for humans. This PR explicitly directs agents to use the cheaper methods to read state in the skills where agents are most likely to need to read state.

@andybaran
andybaran requested a review from a team as a code owner July 7, 2026 14:43
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