Skip to content

feat(web): visualize workflows — agents panel, run cards, stop control (3/4) - #4663

Closed
shivamhwp wants to merge 8 commits into
subagent-obs/03-reusefrom
subagent-obs/04-agents-panel
Closed

shivamhwp wants to merge 8 commits into
subagent-obs/03-reusefrom
subagent-obs/04-agents-panel

fix(orchestration-v2): model task stop failures directly

27ecbe1
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Effect Service Conventions succeeded Aug 3, 2026 in 1m 28s

All clear

All clear

Details

Note

Your check run agent prompt is: .macroscope/check-run-agents/effect-service-conventions.md
More information about how Check Run Agents work can be found in our Help Center.


🔍 Agent activity — reasoning, no tool calls

💭 Looking at the diff to verify the prior violations have been fixed—the stopTask error handling in ClaudeAdapterV2 now properly uses Effect.fail with typed errors, and isProviderTaskStopError is correctly exported. Now I'm checking the current changes for any new convention violations, starting with the imports in the new AgentsPanelV2.tsx file. I notice ProviderTurnControlService introduces a new ProviderTaskStopError with a cause field that's optional and typed as Schema.Defect(), but there's no message getter—I need to verify whether this follows the existing pattern for ProviderTurnControlError. Also, in the stopTask method, when stop is undefined, it's passing a string directly as the cause rather than a real failure, which seems to conflict with the convention against manufacturing errors just to populate cause, though the prior review comment actually suggested this exact approach. Now I'm checking how other adapters handle errors: ClaudeAdapterV2 uses Effect.fail with ClaudeAgentSdkQueryRunnerError, EffectWorker maps errors inline to OrchestrationEffectExecutionError, and ClaudeAdapterV2's stopTask maps to ProviderAdapterProtocolError with payload: cause—that last one concerns me because it's preserving the underlying error directly, which might violate the rule about not copying raw wire payloads into detail, though the field name "payload" suggests this might be an established convention I should verify by looking at the actual files. The interface follows the existing style and was already in place before this PR, which just added the stopTask method to it. Since this is legacy code, I'm not flagging the inline definition as something that needs cleanup. Now I need to examine the new stopTask implementation in the adapter and how it integrates with the run logic. Now I'm looking at the ClaudeAdapterV2 stopTask method around line 4484 to see how it constructs the ProviderAdapterProtocolError with the payload field, and checking whether this matches the pattern used elsewhere in the file. The adapter's stopTask mapping with payload: cause aligns with how the codebase handles payloads, so that's good. Looking at the web-side files, AgentsPanelV2.tsx follows the right import patterns—using namespace imports for Effect modules and named imports from the orchestration helpers as expected for pure utilities. Checking the new operations and commands, ChatView and related components don't introduce any Effect services, which is fine. The new stopThreadSubagent function in threadCommands.ts wraps the call in a lambda, which seems redundant compared to how similar functions are structured elsewhere—worth checking if that's the established pattern. Verifying the test file imports and the new client-runtime package export are all in order. Checking EffectWorker's updated case with the inline OrchestrationEffectExecutionError construction — that's consistent. Looking at ClaudeAdapterV2 around line 4484 where stopTask maps the error using an inline constructor, though it doesn't preserve threadId and related fields. Need to examine whether there are any dependency-injection issues with the React components like AgentsPanelV2 and WorkflowRunCardV2, and verify how Effect.fn and stopTask's error mapping work in context. Verifying the codebase follows conventions—the new optional stopTask on the runtime interface checks out, and the helper function rule doesn't apply here. The orchestration subagents module is clean with no Effect dependencies. Looking at ProviderTaskStopError, the cause field is always provided across both construction paths, so making it optional is a minor stylistic choice that mirrors ProviderTurnControlError. The error also doesn't store an unstructured message, which aligns with the convention of deriving messages from structured attributes instead. One thing to note: ProviderTaskStopError uses cause to carry either a static explanatory string for the unsupported-runtime case or a real failure from the mapper path — this matches the file's style and doesn't violate the "don't manufacture Error" convention. The new error class is also properly separated from ProviderTurnControlError without needing a shared discriminator. I should check the imports in the touched files to see if there are any consolidated "effect" imports that need attention. I'm noticing a conflict between the instruction to output exactly "All clear" and the requirement to respond with JSON according to the schema. The system prompt mandates JSON format, but there's also a directive against adding titles or explanations. I need to reconcile these constraints by fitting "All clear" into the appropriate JSON field. Since there are no findings, the check defaults to success. I'll set the state accordingly with "All clear" as both the title and summary, and skip any additional stateful actions since the prior comments have already been addressed.


Agent Credits: 111 credits