feat: add execution mode toggle and context pressure bounds to parallel skills#336
Merged
feat: add execution mode toggle and context pressure bounds to parallel skills#336
Conversation
…and bound context pressure in parallel skills Add a lightweight execution mode toggle to deepen-plan-beta so small deepening passes avoid unnecessary scratch file overhead. Also add batched dispatch and scratch-backed fallbacks to resolve-pr-parallel and resolve-todo-parallel for large item sets. Establish a repo-wide scratch space convention in AGENTS.md.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b11065e29a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
7 tasks
- deepen-plan-beta: include inline findings from direct-mode agents when switching to artifact-backed mode mid-run, so early results are not silently dropped during synthesis - resolve-pr-parallel: require resolver agents to return substantive reply text for question-only threads, not just bookkeeping fields
Merged
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
Inspired by @Drewx-Design's work in #178, which identified parent context overflow as a real problem in the original
deepen-planand solved it with a full file-based map-reduce architecture. That approach is well-suited to the stabledeepen-planskill, which runs 13-26+ agents against every section of a plan.deepen-plan-betatakes a fundamentally different approach — it scores sections by risk and only deepens the weakest 2-5, using at most ~8 targeted agents total. Because of that smaller scope, the full map-reduce pipeline from #178 would be overengineered here. But the core insight — that unbounded agent returns can overwhelm the parent context — still applies, especially on high-risk plans where even a few agents produce bulky source-backed analysis.This PR adds a lightweight version of that idea: a direct/artifact-backed execution mode toggle. Direct mode (inline returns) is the default for the common case. Artifact-backed mode activates only when the research scope is large enough to justify scratch files — 5+ agents returning meaningful findings, long section excerpts, or high-risk topics. The same pattern is applied to
resolve-pr-parallelandresolve-todo-parallel, which had the same unbounded-return problem with large item sets.Changes
deepen-plan-beta: Adds execution mode toggle with clear escalation signals and a mid-run escape hatch if direct mode starts bloatingresolve-pr-parallelandresolve-todo-parallel: Adds batched dispatch (max 4 concurrent agents) for 5+ items, requires short status summaries, and falls back to per-run scratch directories when needed.context/scratch space convention with namespacing rules and per-run subdirectories to prevent collisions from concurrent runsTest plan
/deepen-plan-betaon a lightweight plan and verify it stays in direct mode/deepen-plan-betaon a deep/high-risk plan with 5+ research agents and verify artifact-backed mode activates/resolve-pr-parallelon a PR with 5+ unresolved threads and verify batched dispatchdeepen-planskill is completely unaffected