Skip to content

feat: add execution mode toggle and context pressure bounds to parallel skills#336

Merged
tmchow merged 2 commits intomainfrom
feat/deepen-plan-beta-review
Mar 22, 2026
Merged

feat: add execution mode toggle and context pressure bounds to parallel skills#336
tmchow merged 2 commits intomainfrom
feat/deepen-plan-beta-review

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented Mar 22, 2026

Summary

Inspired by @Drewx-Design's work in #178, which identified parent context overflow as a real problem in the original deepen-plan and solved it with a full file-based map-reduce architecture. That approach is well-suited to the stable deepen-plan skill, which runs 13-26+ agents against every section of a plan.

deepen-plan-beta takes 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-parallel and resolve-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 bloating
  • resolve-pr-parallel and resolve-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
  • AGENTS.md: Establishes a repo-wide .context/ scratch space convention with namespacing rules and per-run subdirectories to prevent collisions from concurrent runs

Test plan

  • Run /deepen-plan-beta on a lightweight plan and verify it stays in direct mode
  • Run /deepen-plan-beta on a deep/high-risk plan with 5+ research agents and verify artifact-backed mode activates
  • Run /resolve-pr-parallel on a PR with 5+ unresolved threads and verify batched dispatch
  • Verify scratch directories are cleaned up after successful runs
  • Confirm stable deepen-plan skill is completely unaffected

…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.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md Outdated
Comment thread plugins/compound-engineering/skills/deepen-plan-beta/SKILL.md Outdated
- 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
@tmchow tmchow merged commit 216d6df into main Mar 22, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 22, 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.

1 participant