Skip to content

docs: require synchronous dispatch in subagent prompts + add deepseek-v4-pro#1

Merged
jimstratus merged 4 commits into
masterfrom
docs/subagent-sync-execution
Jun 10, 2026
Merged

docs: require synchronous dispatch in subagent prompts + add deepseek-v4-pro#1
jimstratus merged 4 commits into
masterfrom
docs/subagent-sync-execution

Conversation

@jimstratus

Copy link
Copy Markdown
Owner

Summary

Two related changes from a live review session on 2026-05-16:

  1. Register deepseek-v4-pro in config.yaml — 1.6T MoE, 1M ctx, OpenRouter route.
  2. Document subagent execution semantics in SKILL.md §6a + cross-reference in CLAUDE.md.

Why the docs change matters

Subagent-per-reviewer dispatch (the default per SKILL.md §6a) has a silent failure mode when subagent prompts omit explicit synchronous-execution wording: the subagent runs dispatch.py via its own run_in_background, then ends its session before dispatch.py completes, and \$RUN_DIR/reviews/<name>.json is never written. The parent sees a "completed" subagent that reports a plan ("I'll wait for the dispatch...") rather than results.

Observed 3 out of 4 times in a real subagent dispatch session (2026-05-16):

Subagent Behavior Result file written?
argus-opencode Correctly waited synchronously
argus-codex Bailed (returned plan-not-result)
argus-deepseek Bailed (returned plan-not-result)
argus-gemini Bailed (returned plan-not-result)
argus-kimi Correctly waited synchronously

The 60% failure rate is high enough to treat as a default-behavior bug in subagent prompts that omit the directive, not a one-off.

Fix

Documentation-only. dispatch.py itself is correct — the failure is in how callers instruct their subagents. The fix is:

  • SKILL.md §6a now has a CRITICAL: subagent execution semantics subsection that explains the fingerprint and provides a minimal safe prompt template
  • CLAUDE.md cross-references the SKILL.md §6a requirement near the existing dispatch-pattern guidance

Every project using argus picks up the fix immediately via the skill load — no per-caller change required.

Test plan

  • SKILL.md §6a renders correctly (markdown headers consistent with existing structure)
  • CLAUDE.md cross-reference is correct
  • No code change → no test suite impact
  • (manual, next argus run) Verify subagent prompt template eliminates the bailout

🤖 Generated with Claude Code

mrm238 added 2 commits May 16, 2026 20:43
Adds deepseek-v4-pro to the reviewer registry. Routes via aichat ->
OpenRouter (deepseek/deepseek-v4-pro). 1.6T-param MoE with 49B active,
1M context, released 2026-04-24, $0.435/$0.87 per M.

Empirically: returned 1 finding (LOW) on a ~2900-line bundle at 255s
during real review session 2026-05-16, vs 0 findings from opencode on
same bundle. Useful breadth additive — not redundant with v3.2 or kimi.
Adds CRITICAL warning + subagent prompt template to SKILL.md §6a.

Failure mode this prevents: when a calling agent spawns subagents
without explicit synchronous-execution wording, the subagent commonly
runs dispatch.py via its own run_in_background, then ends its own
session before dispatch.py exits. $RUN_DIR/reviews/<name>.json is
never written; the parent sees a 'completed' subagent that reports a
plan ('I'll wait for the dispatch...') instead of results.

Observed 3/4 times on subagent dispatch in real session 2026-05-16
(argus-codex, argus-deepseek, argus-gemini all bailed; argus-opencode
+ argus-kimi correctly waited). Pattern is consistent enough to
treat as a default-behavior bug in subagent prompts that omit the
explicit foreground-wait directive.

Fix is documentation-only:
- SKILL.md §6a: adds 'CRITICAL: subagent execution semantics' subsection
  with the failure-mode fingerprint and a minimal safe prompt template
- CLAUDE.md: cross-references SKILL.md §6a for the requirement

No code change — argus's dispatch.py is correct; the failure is in how
callers instruct their subagents. Catching this at the skill-doc layer
means every project using argus inherits the fix immediately.
Copilot AI review requested due to automatic review settings May 17, 2026 03:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Argus documentation to prevent a known silent failure mode in subagent-per-reviewer dispatch, and extends the reviewer registry to include the new deepseek-v4-pro model.

Changes:

  • Documented that subagents must run dispatch.py synchronously in their own session (no run_in_background inside the subagent) and added a minimal safe prompt template (SKILL.md §6a).
  • Added a cross-reference in CLAUDE.md reinforcing the synchronous subagent prompt requirement.
  • Registered the deepseek-v4-pro reviewer in config.yaml (OpenRouter route, 1M ctx).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
SKILL.md Adds a “CRITICAL” subsection clarifying subagent execution semantics and provides a safe subagent prompt template.
config.yaml Registers deepseek-v4-pro as a paid OpenRouter-backed reviewer with 1M context.
CLAUDE.md Cross-references the new SKILL.md §6a requirement near the existing dispatch guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jimstratus jimstratus added the documentation Improvements or additions to documentation label Jun 10, 2026
Jim Stratus added 2 commits June 10, 2026 07:37
Roster badge 14 -> 15, roster table row, and OPENROUTER_API_KEY coverage
counts (8 of 14 -> 9 of 15) to match the new config.yaml entry. Also brings
the branch up to date with master post-PR #12 (clean auto-merge).

Confidence: high
Scope-risk: narrow
@jimstratus

Copy link
Copy Markdown
Owner Author

Post-#12 status check before merging:

Merging once CI is green.

🤖 Generated with Claude Code

@jimstratus jimstratus merged commit fbc1df9 into master Jun 10, 2026
3 checks passed
@jimstratus jimstratus deleted the docs/subagent-sync-execution branch June 10, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants