René's URL Explorer Experiment


Title: Context window optimization: decisions.md pruning, spawn template dedup, Init Mode compression · Issue #37 · github/squad · GitHub

Open Graph Title: Context window optimization: decisions.md pruning, spawn template dedup, Init Mode compression · Issue #37 · github/squad

X Title: Context window optimization: decisions.md pruning, spawn template dedup, Init Mode compression · Issue #37 · github/squad

Description: Problem decisions.md has ballooned to 298KB (~80K tokens) — that's 40% of a 200K context window consumed on every agent spawn. Combined with squad.agent.md growth (29K tokens) and agent histories (~47K tokens), each agent spawn now costs...

Open Graph Description: Problem decisions.md has ballooned to 298KB (~80K tokens) — that's 40% of a 200K context window consumed on every agent spawn. Combined with squad.agent.md growth (29K tokens) and agent histories (...

X Description: Problem decisions.md has ballooned to 298KB (~80K tokens) — that's 40% of a 200K context window consumed on every agent spawn. Combined with squad.agent.md growth (29K tokens) and agent histori...

Opengraph URL: https://github.com/github/squad/issues/37

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Context window optimization: decisions.md pruning, spawn template dedup, Init Mode compression","articleBody":"## Problem\n\ndecisions.md has ballooned to 298KB (~80K tokens) — that's 40% of a 200K context window consumed on every agent spawn. Combined with squad.agent.md growth (29K tokens) and agent histories (~47K tokens), each agent spawn now costs 82-93K tokens (41-46% of context). This leaves agents working with barely half a context window.\n\n## Root Causes\n\n1. **decisions.md bloat** — 266 blocks, 131 of which are sub-section fragments from old analysis docs. No pruning/archival mechanism exists (unlike history.md which has Scribe summarization). Most blocks are stale sprint artifacts from v0.3.0 planning.\n\n2. **squad.agent.md spawn template duplication** — Three near-identical spawn templates (background, sync, generic) at lines 592-809, each ~1,800 tokens. They differ only in mode/description examples and placeholder names.\n\n3. **Init Mode dead weight** — Init Mode (lines 28-112, ~1,471 tokens) is loaded on every message but only used once per repo lifetime (when .ai-team/team.md doesn't exist).\n\n## Solution\n\n### Immediate (this issue — v0.4.0)\n\n- [x] **Prune decisions.md**: Manual pass — keep ~30-40 active decisions, archive rest to decisions-archive.md. Target: 298KB → ~50KB (~13K tokens)\n- [x] **Dedup spawn templates**: Collapse 3 templates into 1 generic template with mode as a variable. Save ~3,600 tokens\n- [x] **Compress Init Mode**: Reduce redundancy, compress post-setup sources. Target: ~1,471 → ~800 tokens\n- [x] **Update README**: Context Window Budget table with post-optimization numbers\n\n### Future (v0.5.0 — automated)\n\n- Add Scribe-driven decisions.md pruning: identify blocks older than N weeks, summarize, archive originals to decisions-archive.md\n- Similar to existing history.md summarization (Scribe step 6) but for the shared decision ledger\n- Add an `evergreen` tag for decisions that should never be pruned (e.g., \"zero dependencies\", \"cost-first model selection\")\n\n## Impact\n\n| Metric | Before | After (target) |\n|--------|--------|----------------|\n| decisions.md | ~80K tokens | ~13K tokens |\n| squad.agent.md | ~29K tokens | ~23K tokens |\n| Per-agent spawn cost | 82-93K tokens (41-46%) | 19-28K tokens (10-14%) |\n| Context remaining for work | 54-59% | 86-90% |\n\n## Labels\n\ntype:chore, priority:p0, release:v0.4.0","author":{"url":"https://github.com/bradygaster","@type":"Person","name":"bradygaster"},"datePublished":"2026-02-13T10:44:49Z","url":"https://github.com/github/squad/issues/37"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0c59fb75-c900-6399-90bc-9a34c900819e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE008:16AB79:1B80ABA:22F50ED:6B0153E0
html-safe-noncec083c9f271058439ceeec3052eb1057bfc76bfb255fe92190dfcf919d6007cf5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDA4OjE2QUI3OToxQjgwQUJBOjIyRjUwRUQ6NkIwMTUzRTAiLCJ2aXNpdG9yX2lkIjoiODE1NzE5MTM0NTY2MDg0Mjk3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac670067d84dd946d7e408c006fb4833946ed004d2c71d805e59d353e3088134ed
hovercard-subject-tagissue:3936543876
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/squad/37/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2b4e999986bca9ae21452ca2a68f48906b6169dfdd489000b8a9ba15ac688f44/github/squad/issues/37
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2b4e999986bca9ae21452ca2a68f48906b6169dfdd489000b8a9ba15ac688f44/github/squad/issues/37
og:image:altProblem decisions.md has ballooned to 298KB (~80K tokens) — that's 40% of a 200K context window consumed on every agent spawn. Combined with squad.agent.md growth (29K tokens) and agent histories (...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebradygaster
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/github/squad git https://github.com/github/squad.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id1151205052
octolytics-dimension-repository_nwogithub/squad
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1151205052
octolytics-dimension-repository_network_root_nwogithub/squad
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/github/squad/issues/37#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fsquad%2Fissues%2F37
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fsquad%2Fissues%2F37
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=github%2Fsquad
Reloadhttps://github.com/github/squad/issues/37
Reloadhttps://github.com/github/squad/issues/37
Reloadhttps://github.com/github/squad/issues/37
githubhttps://github.com/github
squadhttps://github.com/github/squad
Codehttps://github.com/github/squad
Issues108 (108)https://github.com/github/squad/issues
Pull requests26 (26)https://github.com/github/squad/pulls
Discussionshttps://github.com/github/squad/discussions
Actionshttps://github.com/github/squad/actions
Projectshttps://github.com/github/squad/projects
Security and qualityhttps://github.com/github/squad/security
Insightshttps://github.com/github/squad/insights
https://github.com/github/squad
New issuehttps://github.com/login?return_to=https://github.com/github/squad/issues/37
New issuehttps://github.com/login?return_to=https://github.com/github/squad/issues/37
Context window optimization: decisions.md pruning, spawn template dedup, Init Mode compressionhttps://github.com/github/squad/issues/37#top
priority:p0Blocking releasehttps://github.com/github/squad/issues?q=state%3Aopen%20label%3A%22priority%3Ap0%22
release:v0.4.0Targeted for v0.4.0https://github.com/github/squad/issues?q=state%3Aopen%20label%3A%22release%3Av0.4.0%22
type:choreMaintenance, refactoring, cleanuphttps://github.com/github/squad/issues?q=state%3Aopen%20label%3A%22type%3Achore%22
https://github.com/bradygaster
bradygasterhttps://github.com/bradygaster
on Feb 13, 2026https://github.com/github/squad/issues/37#issue-3936543876
bradygasterhttps://github.com/bradygaster
release:v0.4.0Targeted for v0.4.0https://github.com/github/squad/issues?q=state%3Aopen%20label%3A%22release%3Av0.4.0%22
type:choreMaintenance, refactoring, cleanuphttps://github.com/github/squad/issues?q=state%3Aopen%20label%3A%22type%3Achore%22
priority:p0Blocking releasehttps://github.com/github/squad/issues?q=state%3Aopen%20label%3A%22priority%3Ap0%22
on Feb 13, 2026https://github.com/github/squad/issues/37#event-22762896178
bradygasterhttps://github.com/bradygaster
on Feb 13, 2026https://github.com/github/squad/issues/37#event-22763027360
feat: context window optimization — decisions pruning, template dedup…https://github.com/github/squad/commit/b5aa6c18d427c86ff75edba5b679e7c65254e38b
b5aa6c1https://github.com/github/squad/commit/b5aa6c18d427c86ff75edba5b679e7c65254e38b
https://github.com/bradygaster
bradygasterhttps://github.com/bradygaster
on Feb 13, 2026https://github.com/github/squad/issues/37#issuecomment-3896515888
b5aa6c1https://github.com/github/squad/commit/b5aa6c18d427c86ff75edba5b679e7c65254e38b
bradygasterhttps://github.com/bradygaster
completedhttps://github.com/github/squad/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 13, 2026https://github.com/github/squad/issues/37#event-22763031595
bradygasterhttps://github.com/bradygaster
on Mar 27, 2026https://github.com/github/squad/issues/37#event-23967284809
docs(nap): add archiveDecisions() contract comment (closes #37) (#648)https://github.com/github/squad/commit/a31fdedfbe133b580b546ff6b5f0c71697f19e37
#37https://github.com/github/squad/issues/37
#648https://github.com/github/squad/pull/648
https://docs.github.com/articles/closing-issues-via-commit-messages
a31fdedhttps://github.com/github/squad/commit/a31fdedfbe133b580b546ff6b5f0c71697f19e37
akublyhttps://github.com/akubly
on Jun 9, 2026https://github.com/github/squad/issues/37#event-26546509635
feat(piece-37): repair dogfood-surfaced defects and publish-model fixeshttps://github.com/akubly/squad/commit/f9894c8772e17135bc1055684453656f047e2455
https://docs.github.com/articles/closing-issues-via-commit-messages
f9894c8https://github.com/akubly/squad/commit/f9894c8772e17135bc1055684453656f047e2455
feat(piece-37): repair dogfood-surfaced defects and publish-model fixeshttps://github.com/akubly/squad/commit/deb94a26d0cad44eb9fdd0a6f06d971d91f4c839
https://docs.github.com/articles/closing-issues-via-commit-messages
deb94a2https://github.com/akubly/squad/commit/deb94a26d0cad44eb9fdd0a6f06d971d91f4c839
bradygasterhttps://github.com/bradygaster
on Aug 21, 2026https://github.com/github/squad/issues/37#event-29798641068
docs(e2e): record E4 agent-binding verification resulthttps://github.com/github/squad/commit/c3fd9532b2224621433ea667671aa039968497c9
c3fd953https://github.com/github/squad/commit/c3fd9532b2224621433ea667671aa039968497c9
docs(e2e): record E4 agent-binding verification result (PASS, n=1) (#…https://github.com/github/squad/commit/51ea275cb3430fa93e9bd914a53ad816cf96d8b5
#…https://github.com/github/squad/pull/1813
51ea275https://github.com/github/squad/commit/51ea275cb3430fa93e9bd914a53ad816cf96d8b5
Sign up for freehttps://github.com/signup?return_to=https://github.com/github/squad/issues/37
Sign in to commenthttps://github.com/login?return_to=https://github.com/github/squad/issues/37
priority:p0Blocking releasehttps://github.com/github/squad/issues?q=state%3Aopen%20label%3A%22priority%3Ap0%22
release:v0.4.0Targeted for v0.4.0https://github.com/github/squad/issues?q=state%3Aopen%20label%3A%22release%3Av0.4.0%22
type:choreMaintenance, refactoring, cleanuphttps://github.com/github/squad/issues?q=state%3Aopen%20label%3A%22type%3Achore%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.