fix: resolve agent runtime by spawn path - #2
Open
OliverHennhoefer wants to merge 1 commit into
Open
Conversation
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.
Problem
sol-advisorverifies a spawned agent’s role, model, and effort before accepting its work. The runtime inspector could previously identify a rollout only by UUID, while nativespawn_agentreturns a task path instead.In the reproduced case,
spawn_agentreturned/root/job_read_auth_rereview. The matching rollout recordedsol_advisor_sol_reviewer,gpt-5.6-sol, andhigh, but its UUID was not available to the caller. The fail-closed workflow therefore could not verify a correctly configured reviewer.This surfaced during a long-running
/goaltask because the failed verification interrupted the next review pass, but the identifier mismatch is not specific to/goal.The workflow stopped with:
That response combines two verification gates. This PR fixes the routing-evidence failure caused by the unavailable UUID; sandbox behavior remains unchanged.
Fix
Add path-based lookup:
The caller records the cutoff immediately before spawning and then passes the task path returned by
spawn_agent.The inspector matches the exact
session_meta.agent_pathat or after the cutoff and requires exactly one result. It resolves that rollout’s UUID internally, then reuses the existing filename and runtime validation. The cutoff prevents an older rollout from being selected when a task path is reused.Missing, ambiguous, malformed, or inconsistent metadata still fails closed. The inspector does not search prompts or select the latest match.
Compatibility
The existing positional UUID interface and its output are unchanged.
This does not change agent roles, model or effort pins, sandbox validation, fallback behavior, retries, or goal lifecycle policy. Short and one-off tasks retain the same implementation and review workflow; only runtime identification changes when local evidence is required.
Verification
Tests cover UUID output compatibility, unique and reused paths, concurrent and ambiguous matches, RFC3339 timestamps and offsets, malformed metadata, safe output, and existing strict routing validation.
Validated with:
The orchestration skill and plugin validators also pass.