This page covers the most common issues encountered during the Temporal + OpenAI Agents SDK workshop — from environment setup errors to Temporal worker configuration problems. Each section explains what causes the problem, how to diagnose it, and the exact steps to fix it.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/temporalio/edu-ai-workshop-openai-agents-sdk/llms.txt
Use this file to discover all available pages before exploring further.
Environment Issues
OPENAI_API_KEY not found
OPENAI_API_KEY not found
Symptom: An exercise fails immediately with an error like Fix:If Then open Get a key at https://platform.openai.com/api-keys. The workshop uses approximately 1.00 of API credits — the free tier is sufficient.
AuthenticationError, OPENAI_API_KEY is not set, or ERROR: .env file not found.Diagnosis:.env doesn’t exist, create it from the sample template:.env in your editor and replace the placeholder with your real key:Temporal server not running
Temporal server not running
Symptom: Exercises 2, 3, or 4 fail with If this returns no output, the server is not running.Fix:Use the
Failed to connect to Temporal server, connection refused on localhost:7233, or the Temporal UI is unreachable at port 8233.Diagnosis:temporal_installation.ipynb notebook (recommended):- Open
temporal_installation.ipynbin VS Code - Run each cell in order — this installs the Temporal CLI and starts the dev server
- In Codespaces: Go to the Ports tab at the bottom of VS Code → Find port 8233 → Click the Globe icon to open the Temporal Web UI
Temporal must be running for exercises 2, 3, and 4. Exercise 1 (OpenAI
agent basics) does not require Temporal and can run without it.
Dependency & Import Issues
Import errors or module not found
Import errors or module not found
Symptom: The
ModuleNotFoundError: No module named 'agents', No module named 'temporalio', or similar import errors when running an exercise.Fix:Reinstall all dependencies from the project root:-e flag installs the project in editable mode, which means Python picks up any local source changes without a reinstall.Tests fail with 'module not found'
Tests fail with 'module not found'
Symptom: Running
make test or pytest produces ModuleNotFoundError even though the packages seem to be installed.Cause: The project must be installed in editable mode from the repository root for test imports to resolve correctly. Running pytest from a subdirectory or without the editable install breaks the import path.Fix:Notebook Issues
Notebook kernel not found
Notebook kernel not found
Symptom: VS Code shows “Select Kernel” when you open an Then, in VS Code:
.ipynb file, or the kernel picker doesn’t include a temporal-workshop option.Fix:Install ipykernel and register a named kernel for the workshop environment:- Open any workshop notebook (
.ipynb) - Click Select Kernel in the top-right corner
- Choose temporal-workshop from the list
Can't access Temporal UI at localhost:8233
Can't access Temporal UI at localhost:8233
Symptom: Opening
http://localhost:8233 in your browser shows “This site can’t be reached”, or the port isn’t available locally.Fix (GitHub Codespaces):Port forwarding in Codespaces is managed through the VS Code Ports tab, not via a direct localhost address in your local browser:- Go to the Ports tab at the bottom of VS Code (next to Terminal)
- Find port 8233 in the list — it’s labeled “Temporal UI”
- Click the Globe icon (🌐) to open it in your browser
Synchronous activity errors in Jupyter
Synchronous activity errors in Jupyter
Symptom: Running a Temporal Also ensure that all activity functions defined in notebooks use
Worker inside a Jupyter notebook raises errors about synchronous activities or the event loop, such as RuntimeError: This event loop is already running or SynchronousActivityError.Cause: Jupyter runs its own asyncio event loop. Temporal’s default Worker configuration expects to manage the loop itself, which conflicts with the notebook environment.Fix:Pass workflow_runner=UnsandboxedWorkflowRunner() and debug_mode=True to the Worker constructor:async def rather than plain def:Exercise 4 — Worker & Routing Issues
Worker not picking up tasks
Worker not picking up tasks
Symptom: If task queue names match and the worker is still idle, stop and restart the worker:
starter.py submits a workflow that stays stuck in the “Running” state in the Temporal UI. The worker terminal shows no activity after the workflow is submitted.Diagnosis checklist:- Confirm the worker is running and showing
⏳ Polling for tasks...in Terminal 1 - Check that the
TASK_QUEUEconstant inworker.pyandstarter.pyboth equal"routing-workflow-queue"— a mismatch means the worker is listening on the wrong queue - Look at the worker terminal for any Python tracebacks or error messages
Temporal Activity timeouts
Temporal Activity timeouts
Symptom: Workflow execution fails with As a general rule, use
ActivityError or StartToCloseTimeoutError after a long wait. The Temporal UI shows an activity that timed out.Cause: The default start_to_close_timeout on ModelActivityParameters may be too short for the model you’re using. GPT-4 is significantly slower than GPT-4o-mini and can exceed a 30-second timeout under load.Fix:Increase start_to_close_timeout when creating the OpenAIAgentsPlugin:gpt-4o-mini for workshop exercises to minimize latency and cost. Switch to gpt-4 only when accuracy requires it and adjust the timeout accordingly.Additional Resources
If you’re still blocked after working through the sections above, the following resources provide deeper reference material for both Temporal and the OpenAI Agents SDK.Temporal Documentation
The complete reference for Temporal concepts, SDKs, server configuration,
and deployment guides.
OpenAI API Reference
Full API reference for models, chat completions, tool calling, and the
OpenAI platform.
OpenAI Agents SDK
Official documentation for the OpenAI Agents SDK — agents, runners, tools,
handoffs, and tracing.
Temporal Python SDK
Python-specific developer guide covering workflows, activities, workers,
schedules, and testing.
Temporal Samples — Agent Patterns
Production-ready sample code showing common agent patterns built with
Temporal and the OpenAI Agents SDK.
Workshop Slides
The slide deck used during the live workshop session covering architecture,
key concepts, and exercise walkthroughs.