Skip to content

fix(opencode): remove 150-line cap from /init AGENTS.md generation#19374

Closed
MoerAI wants to merge 1 commit intoanomalyco:devfrom
MoerAI:fix/init-agents-md-truncation-19341
Closed

fix(opencode): remove 150-line cap from /init AGENTS.md generation#19374
MoerAI wants to merge 1 commit intoanomalyco:devfrom
MoerAI:fix/init-agents-md-truncation-19341

Conversation

@MoerAI
Copy link

@MoerAI MoerAI commented Mar 27, 2026

Summary

  • Remove the hard-coded "Make it about 150 lines long" instruction from the /init command template
  • Replace with guidance to be comprehensive while staying concise, allowing the generated AGENTS.md to fully capture project context

Problem

The /init command generates AGENTS.md by instructing the LLM to create a file "about 150 lines long". For medium-to-large projects, this causes important context (testing patterns, deployment config, architectural decisions) to be silently truncated.

Fix

Changed the template instruction in packages/opencode/src/command/template/initialize.txt from:

Make it about 150 lines long.

To:

Be comprehensive — include all relevant project context, but stay concise and avoid filler. Aim for completeness over brevity.

This lets the LLM scale the output to match project complexity while still discouraging unnecessary verbosity.

Closes #19341

The /init command template instructed the LLM to make AGENTS.md 'about
150 lines long', causing important project context to be silently
truncated for larger codebases. Replace the hard line limit with
guidance to be comprehensive while staying concise.

Closes anomalyco#19341
@github-actions
Copy link
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 27, 2026
@github-actions
Copy link
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 27, 2026
@github-actions github-actions bot closed this Mar 27, 2026
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.

/init truncates AGENTS.md to ~150 lines, losing project context

2 participants