fix(atlas): restore agent mismatch guard for subagent boulder continuation#2751
Merged
code-yeongyu merged 1 commit intocode-yeongyu:devfrom Mar 25, 2026
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Restores a previously removed agent mismatch guard to prevent subagents from incorrectly continuing boulders, fixing a known regression with comprehensive test coverage.
sjawhar
added a commit
to sjawhar/oh-my-opencode
that referenced
this pull request
Mar 26, 2026
Rebased onto dev@upstream (v3.13.1). Dropped fix/look-at-respect-configured-model and fix/atlas-subagent-agent-guard (merged upstream as PRs code-yeongyu#2686 and code-yeongyu#2751).
4 tasks
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
Restores the agent mismatch guard for boulder continuation that was accidentally removed on Mar 9 (
vmxzmltv/53337ad6), preventing worker subagent sessions from receiving plan-scoped continuation that overrides their single-task constraint.idle-event.ts: subagent sessions only get boulder continuation if their agent matches the boulder's required agent (atlas/sisyphus)subagentSessions) bypass the check entirelyCloses #18681
Problem
The atlas hook's
resolveActiveBoulderSession()adopts task-spawned subagent sessions into the boulder via lineage walking. Once adopted,BOULDER_CONTINUATION_PROMPT("read the plan file, do all tasks") is injected regardless of the subagent's agent type.This causes worker subagents running as
sisyphus-junior,oracle,explore, etc. to override their single-task constraint and race through the entire plan in parallel, stepping on each other's file edits.Root Cause
The original atlas hook had a
shouldSkipForAgentMismatchguard that only allowed sessions whose agent matched the boulder's required agent. This guard was removed in commitvmxzmltv("fix(atlas): append idle subagent sessions to active boulder") when the adoption mechanism was refactored. The subsequent lineage restriction (kovyrtor) did not restore it.Fix
Add an agent mismatch guard in
handleAtlasSessionIdle()after the adoption/append log block and before continuation injection:subagentSessions(task-spawned), verify agent matches boulder's required agentsisyphusforatlas-agent boulders (original pre-regression allowance)subagentSessions(the orchestrator) always bypass the checkappendSessionId) remains intact for tracking purposesTesting
bun run typecheckcleanSummary by cubic
Restore the agent mismatch guard for boulder continuation so only matching subagents receive continuation; prevents worker subagents from bypassing their single-task constraint. Addresses Linear #18681.
handleAtlasSessionIdle: for sessions insubagentSessions, require agent match with boulder agent; allowsisyphuswhen boulder agent isatlas.Written for commit 5777bf9. Summary will update on new commits.