Summary
`/speckit-analyze` freezes or becomes very slow when run in a long session since `context: fork` was added in #2511 (shipped in v0.11.8). The change is well-intentioned but rests on an assumption that breaks in practice.
Environment
- Spec Kit version: 0.11.8 (Claude integration installed 2026-06-26)
- Agent: Claude Code
Steps to Reproduce
- Start a Claude Code session and do any meaningful work (10+ messages)
- Run `/speckit-analyze` — note: output is 300–500 lines of markdown with 6+ tables
- Continue the session (discuss findings, run other commands, etc.)
- Run `/speckit-analyze` again in the same session
- Observe: the second and subsequent runs are noticeably slower, eventually freezing the chat output
The freeze does not occur in a fresh session (first message = `/speckit-analyze`).
Root Cause
PR #2511 added `context: fork` + `agent: general-purpose` to the generated `speckit-analyze` SKILL.md via `FORK_CONTEXT_COMMANDS` in `src/specify_cli/integrations/claude/init.py`.
The PR description states:
No conversation history needed. The task is fully described by the skill content and `$ARGUMENTS`.
Heavy inputs that collapse to a short report.
Both assumptions fail in practice:
-
The report is not short. A realistic spec (9 FRs, 8 SCs, 24 tasks, constitution) produces 300–500 lines of markdown — not a "compact findings table". This output is injected back into the main conversation on every run.
-
Each subsequent fork in the same session inherits a larger context. Because the previous analyze output (400 lines) lands in the main conversation, the next fork starts with an even bigger context to copy. The overhead compounds with each run.
Before #2511, `/analyze` ran directly in the main agent (which already had the context loaded). Spawning a fresh subagent, copying the full conversation, loading all spec artefacts, generating a 400-line report, and returning it to the main conversation adds significant overhead — especially on repeated runs.
Suggested Fix
Option A (minimal): Remove `analyze` from `FORK_CONTEXT_COMMANDS` — restore pre-#2511 behavior while the output format remains verbose.
Option B (intent-preserving): Keep `context: fork` but add a `## Summary` section at the top of the analyze output (5–10 lines max) and move the full findings table behind a `
Details
` block. The fork then genuinely returns a compact result to the main conversation, matching the PR's original intent.
Option B is better long-term but requires changes to `templates/commands/analyze.md`. Option A is a one-line rollback.
Impact
- Affects any user who runs `/speckit-analyze` more than once per session
- Likely under-reported because v0.11.8 shipped 2026-06-24 (2 days ago) and the issue only compounds on repeated runs in the same session
Summary
`/speckit-analyze` freezes or becomes very slow when run in a long session since `context: fork` was added in #2511 (shipped in v0.11.8). The change is well-intentioned but rests on an assumption that breaks in practice.
Environment
Steps to Reproduce
The freeze does not occur in a fresh session (first message = `/speckit-analyze`).
Root Cause
PR #2511 added `context: fork` + `agent: general-purpose` to the generated `speckit-analyze` SKILL.md via `FORK_CONTEXT_COMMANDS` in `src/specify_cli/integrations/claude/init.py`.
The PR description states:
Both assumptions fail in practice:
The report is not short. A realistic spec (9 FRs, 8 SCs, 24 tasks, constitution) produces 300–500 lines of markdown — not a "compact findings table". This output is injected back into the main conversation on every run.
Each subsequent fork in the same session inherits a larger context. Because the previous analyze output (400 lines) lands in the main conversation, the next fork starts with an even bigger context to copy. The overhead compounds with each run.
Before #2511, `/analyze` ran directly in the main agent (which already had the context loaded). Spawning a fresh subagent, copying the full conversation, loading all spec artefacts, generating a 400-line report, and returning it to the main conversation adds significant overhead — especially on repeated runs.
Suggested Fix
Option A (minimal): Remove `analyze` from `FORK_CONTEXT_COMMANDS` — restore pre-#2511 behavior while the output format remains verbose.
Option B (intent-preserving): Keep `context: fork` but add a `## Summary` section at the top of the analyze output (5–10 lines max) and move the full findings table behind a `
Details
` block. The fork then genuinely returns a compact result to the main conversation, matching the PR's original intent.Option B is better long-term but requires changes to `templates/commands/analyze.md`. Option A is a one-line rollback.
Impact