.gms (GAMS) files misclassified as non-text in @include

Resolved 💬 4 comments Opened Mar 28, 2026 by benjaminpeeters Closed Apr 28, 2026

Description

GAMS files (.gms extension) are silently skipped when used in @include directives in CLAUDE.md. The debug log shows:

Skipping non-text file in @include: /home/.../inst/gams/main.gms

.gms is the standard file extension for GAMS (General Algebraic Modeling System) source files, which are plain text files containing mathematical optimization models. They are widely used in economics, energy modeling, and operations research.

Steps to reproduce

  1. Create a CLAUDE.md with @path/to/file.gms
  2. Launch Claude Code with --debug
  3. Check /context -- the .gms file is missing
  4. Debug log shows "Skipping non-text file in @include"

Expected behavior

.gms files should be recognized as text and included like .R, .py, or .md files.

Environment

  • Claude Code v2.1.86
  • Linux

Related

Same class of bug as #18287 (.dat files misclassified as binary). The file type detection is extension-based and the allowlist is missing common scientific/modeling extensions.

Suggestion

Add .gms to the recognized text file extensions list. Ideally, also consider making this configurable or using content-based detection.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗