Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Standard Docker deployments do not pass through the new variable, and the config test cleanup helper omits it.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds opt-in per-agent skipping of incremental tool-loop summarization while retaining restore-time summarization.
Changes:
- Adds case-insensitive, whitespace-tolerant agent matching.
- Adds environment configuration and tests.
- Documents the new setting and usage.
File summaries
| File | Summary | Review Notes |
|---|---|---|
backend/pkg/providers/performer.go |
Applies selective summarization skipping. | No issues reported. |
backend/pkg/providers/helpers_test.go |
Tests agent-type matching. | No issues reported. |
backend/pkg/config/config.go |
Defines the environment-backed setting. | Moderate: wire the variable through Compose and installer/environment-example paths. (2 votes) |
backend/pkg/config/config_test.go |
Tests defaults and parsing. | Moderate: clear the new environment variable in clearConfigEnv. (3 votes) |
backend/docs/config.md |
Documents configuration and usage. | Moderate: add the variable to the Docker Compose environment mapping. (1 vote) |
Review details
Suppressed comments (1)
backend/docs/config.md:1124
- This setting is parsed by the binary, but standard Docker Compose deployments never pass it into the
pentagicontainer:docker-compose.ymluses an explicit environment allowlist and this variable is absent. Setting the documented variable in the project.envtherefore silently leaves the feature disabled; add it to the Compose mapping before exposing it as a usable deployment option.
| SummarizerSkipToolLoopAgentTypes | `SUMMARIZER_SKIP_TOOL_LOOP_AGENT_TYPES` | empty | Comma-separated agent types that skip incremental summarization after tool-call rounds |
- Files reviewed: 5/5 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // SummarizerSkipToolLoopAgentTypes disables incremental summarization after | ||
| // tool-call rounds for selected agent types. Restore-time summarization is | ||
| // unaffected, preserving a safety boundary for interrupted long chains. | ||
| SummarizerSkipToolLoopAgentTypes []string `env:"SUMMARIZER_SKIP_TOOL_LOOP_AGENT_TYPES"` |
| assert.Equal(t, 10, config.SummarizerMaxQASections) | ||
| assert.Equal(t, 65536, config.SummarizerMaxQABytes) | ||
| assert.Equal(t, 1, config.SummarizerKeepQASections) | ||
| assert.Empty(t, config.SummarizerSkipToolLoopAgentTypes) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARIZER_SKIP_TOOL_LOOP_AGENT_TYPESas an opt-in, comma-separated configurationSummarizeChaincalls after tool rounds for matching agent typesMotivation
For tool-heavy specialist agents, an aggressive summarizer configuration can add another LLM request after nearly every tool round. On large-context models this can increase wall-clock latency substantially even when retaining the unsummarized specialist chain is acceptable.
The new option allows operators to choose that tradeoff per agent type instead of disabling summarization globally. Matching is case-insensitive and ignores surrounding whitespace.
Example:
Leaving the variable empty retains the existing behavior.
Validation
go test ./pkg/config ./pkg/providers ./pkg/csum -count=1go build ./cmd/pentagigit diff --check