This behavior matches known issues where publishing an agent or flow surfaces expression/reference problems due to missing or broken dependencies, rather than a simple transient “bug” in the Set/Initialize blocks themselves.
Because the context doesn’t provide a specific fix timeline, focus on diagnosing and stabilizing the solution so the variables no longer resolve to null after publish:
- Use Copilot’s publish‑error assistance (when available)
When saving or publishing the agent flow, if an error appears in the message bar, select Assist me. Copilot will open a pane, review the flow and error details, and give step‑by‑step guidance to fix save/publish issues in the designer. - Check for missing dependencies in the solution
Expression errors likeIdentifierNotRecognizedor invalid references often mean components required by your flow (including variables, environment variables, connection references, or workflows) aren’t fully included in the solution:- In Power Apps (
make.powerapps.com), open the solution that contains the agent. - Go to Objects and verify that relevant components are present, especially:
- Workflows
- Environment variables
- Connection references
- For each component showing Not Recognized, open the command menu (⋮), select Advanced, then Add required objects.
- Repeat Add required objects for the main Agent component to automatically include all dependencies.
- Export the solution again so the updated dependencies are captured, then re‑import/publish and retest.
- In Power Apps (
- Test the agent flow in the designer after publish
After publishing, run tests directly in the flow designer to confirm variable initialization and Set blocks behave correctly:- Save and publish the flow.
- On the canvas menu, select Test to open Test Flow.
- Choose Manually or Automatically.
- In Run Flow, select Test → Run flow and verify each action’s output, including the Initialize/Set variable steps. A green checkmark indicates success.
- Select Done.
Testing here doesn’t consume Copilot Studio capacity and helps isolate whether failures are due to publish/solution issues or downstream changes.
- If the issue persists, open a support case
If variables still resolve to null or initialization fails after following the dependency steps, create a support case with Microsoft Support for Copilot Studio. Include:- Network trace capturing the publish/test errors
- Full error details from the publish or test run
- Screenshots of solution layers, agent dependencies, and any conflict views
- A description of the recent changes (including the compose edits) and steps already tried
- The solution
.zipfile, if possible
This allows the product team to confirm whether the behavior is a known service issue and advise on workarounds or fixes.
Because the documentation doesn’t specify a public ETA for a fix, treating this as a dependency/publish issue and escalating via Support is the recommended path.
References: