Open
Conversation
Demonstrates orchestrator + subagent pattern with shared task ID, Temporal workflows, MCP server integration, and conversation compaction. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment on lines
+15
to
+18
| netcat-openbsd \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/** | ||
|
|
There was a problem hiding this comment.
Hardcoded
arm64 tctl binary breaks builds on amd64 hosts
The Dockerfile downloads the linux_arm64 Temporal CLI binary unconditionally. This works on Apple Silicon (M-series) macs but will fail silently or crash at runtime on any amd64/x86_64 build environment (e.g., Linux CI, most cloud build agents).
The same issue exists in all four Dockerfiles:
examples/demos/deep_research/orchestrator/Dockerfile:15examples/demos/deep_research/github_researcher/Dockerfile:15examples/demos/deep_research/docs_researcher/Dockerfile:16examples/demos/deep_research/slack_researcher/Dockerfile:15
Consider detecting the architecture at build time:
RUN ARCH=$(dpkg --print-architecture) && \
curl -L https://github.com/temporalio/tctl/releases/download/v1.18.1/tctl_1.18.1_linux_${ARCH}.tar.gz -o /tmp/tctl.tar.gz && \
tar -xzf /tmp/tctl.tar.gz -C /usr/local/bin && \
chmod +x /usr/local/bin/tctl && \
rm /tmp/tctl.tar.gzPrompt To Fix With AI
This is a comment left during a code review.
Path: examples/demos/deep_research/orchestrator/Dockerfile
Line: 15-18
Comment:
**Hardcoded `arm64` tctl binary breaks builds on `amd64` hosts**
The Dockerfile downloads the `linux_arm64` Temporal CLI binary unconditionally. This works on Apple Silicon (M-series) macs but will fail silently or crash at runtime on any `amd64`/`x86_64` build environment (e.g., Linux CI, most cloud build agents).
The same issue exists in all four Dockerfiles:
- `examples/demos/deep_research/orchestrator/Dockerfile:15`
- `examples/demos/deep_research/github_researcher/Dockerfile:15`
- `examples/demos/deep_research/docs_researcher/Dockerfile:16`
- `examples/demos/deep_research/slack_researcher/Dockerfile:15`
Consider detecting the architecture at build time:
```dockerfile
RUN ARCH=$(dpkg --print-architecture) && \
curl -L https://github.com/temporalio/tctl/releases/download/v1.18.1/tctl_1.18.1_linux_${ARCH}.tar.gz -o /tmp/tctl.tar.gz && \
tar -xzf /tmp/tctl.tar.gz -C /usr/local/bin && \
chmod +x /usr/local/bin/tctl && \
rm /tmp/tctl.tar.gz
```
How can I resolve this? If you propose a fix, please make it concise.
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
Test plan
agentex agents run --manifest manifest.yaml🤖 Generated with Claude Code
Greptile Summary
This PR adds a complete multi-agent deep research demo (
examples/demos/deep_research/) consisting of four agents — an orchestrator and three specialized subagents (GitHub, Docs, Slack). It demonstrates several important AgentEx patterns: orchestrator/subagent communication via ACP, unified output through a shared parenttask_id, Temporal-safe batchedRunner.run()loops with a two-stage conversation compaction strategy, and MCP server integration viaStatelessMCPServerProvider.Key findings:
Runner.run(): The subagent workflows all wrap their runner loops in try/except and always reach_complete_task = True. The orchestrator does not, meaning any exception (API error, max-turns, timeout) will leave_complete_task = Falseand causeon_task_createto hang indefinitely atawait workflow.wait_condition(lambda: self._complete_task, timeout=None).linux_arm64tctl binary: This breaks builds on amd64 hosts (standard Linux CI, most cloud build environments). The architecture should be detected at build time.summarization.pyis duplicated verbatim across all three subagent packages. Any change (threshold tuning, bug fixes) must be manually applied in three places.find_last_summary_indexis dead code: Defined in all threesummarization.pycopies but never imported or called by any workflow.Confidence Score: 3/5
examples/demos/deep_research/orchestrator/project/workflow.py(missing error handling) and all fourDockerfilefiles (arm64 binary hardcode).Important Files Changed
Sequence Diagram
sequenceDiagram participant User participant Orch as Orchestrator<br/>(ResearchOrchestratorWorkflow) participant GH as GitHub Researcher<br/>(GitHubResearchWorkflow) participant Docs as Docs Researcher<br/>(DocsResearchWorkflow) participant Slack as Slack Researcher<br/>(SlackResearchWorkflow) User->>Orch: EVENT_SEND (user query) Orch->>Orch: Runner.run(agent, max_turns=50)<br/>agent calls dispatch tools in parallel par Parallel dispatch Orch->>GH: acp.create_task(source_task_id=orch_task_id)<br/>+ EVENT_SEND {query} Orch->>Docs: acp.create_task(source_task_id=orch_task_id)<br/>+ EVENT_SEND {query} Orch->>Slack: acp.create_task(source_task_id=orch_task_id)<br/>+ EVENT_SEND {query} end GH-->>User: adk.messages.create(task_id=orch_task_id) [streams progress] Docs-->>User: adk.messages.create(task_id=orch_task_id) [streams progress] Slack-->>User: adk.messages.create(task_id=orch_task_id) [streams progress] GH->>Orch: EVENT_SEND {event_type: research_complete, result: ...} Docs->>Orch: EVENT_SEND {event_type: research_complete, result: ...} Slack->>Orch: EVENT_SEND {event_type: research_complete, result: ...} Note over Orch: workflow.wait_condition satisfied<br/>for each child_task_id Orch->>Orch: Runner.run() resumes — synthesizes all results Orch-->>User: Final comprehensive answer (streamed via TemporalStreamingHooks)Comments Outside Diff (1)
examples/demos/deep_research/orchestrator/project/workflow.py, line 2192-2196 (link)Runner.run()may hang workflow indefinitelyThe orchestrator's
on_task_event_sendsignal handler has no try/except aroundRunner.run(). If the runner throws for any reason (e.g., max turns exceeded, API error, timeout),_complete_taskwill never be set toTrue, causingon_task_createto hang forever atawait workflow.wait_condition(lambda: self._complete_task, timeout=None).All three subagent workflows correctly wrap their
Runner.run()calls in try/except and ensure_complete_task = Trueis always reached. The orchestrator should do the same:Prompt To Fix With AI
Prompt To Fix All With AI
Last reviewed commit: "Add deep research mu..."