Skip to content

feat: surface full circular dependency cycle chains in context bomb#75

Merged
claude[bot] merged 1 commit intomainfrom
claude/issue-72-20260227-0923
Feb 27, 2026
Merged

feat: surface full circular dependency cycle chains in context bomb#75
claude[bot] merged 1 commit intomainfrom
claude/issue-72-20260227-0923

Conversation

@claude
Copy link
Contributor

@claude claude bot commented Feb 27, 2026

Summary

  • Add Cycles []CircularDependencyCycle field to ProjectGraph struct in internal/api/client.go so cycle chain data is preserved through the cache layer
  • Store cr.circDeps.Cycles in cmd/run.go (alongside the existing count in Stats.CircularDependencyCycles) when fetching from the API
  • Update the context bomb template in internal/template/render.go to render each cycle path (e.g. fileA → fileB → fileC → fileA) below the existing count warning
  • Update truncateToTokenBudget to also list cycle paths in the required header when output is budget-truncated

Closes #72

Generated with Claude Code

Store the []CircularDependencyCycle slice in ProjectGraph.Cycles so the
full chain data is preserved through the cache and rendered in the output.
Previously only the count was stored; now each cycle path is listed in
the context bomb warning section (e.g. "fileA → fileB → fileC → fileA").

Also update truncateToTokenBudget to render cycle paths in the required
header when the output is budget-truncated.

Co-Authored-By: Grey Newell <greyshipscode@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude claude bot merged commit 29ae43c into main Feb 27, 2026
1 check passed
@claude claude bot deleted the claude/issue-72-20260227-0923 branch February 27, 2026 09:46
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.

enhancement: surface full circular dependency cycle chains in context bomb

0 participants