Skip to main content
Rule ID: AE-CTX-004 · Severity: Medium · Category: Context · Auto-fixable: Yes

Why this rule

Agent session files checked into git expose local machine state and session history to the repo’s commit record. They also inflate the tracked file set every agent scans on each task, adding irrelevant noise to the agent’s view of the codebase.

What triggers it

Charter checks whether .gitignore excludes the following agent session artifact patterns: The finding also fires if any of these patterns are already tracked in git — a .gitignore entry alone does not remove a file that was previously committed.

Examples

.gitignore (missing entries)

How to fix

1

Preview the changes

Run charter fix with --rule AE-CTX-004 --dry-run to see which .gitignore entries will be added.
2

Apply the fix

Run charter fix --rule AE-CTX-004 to append the missing patterns to .gitignore.
3

Remove any already-tracked artifacts

If agent artifacts were previously committed, untrack them without deleting the local files:

Score impact

Medium (−4 per finding). No hard cap — caps are reserved for raw-secret and Blocker findings. See Scoring and caps.

Edge cases

Team-owned config files such as .cursor/rules, .claude/settings.json, and hk.pkl should stay committed. AE-CTX-004 targets local cache and session state, not shared configuration — those paths never fire the finding.

AE-CTX-001

Context file must exist and be within budget.

CLI