Skip to content

fix(managed_agents): self-close <img> tags so MDX build does not fail#509

Merged
PedramNavid merged 1 commit into
mainfrom
pedram/fix-managed-agents-img-tags
Apr 8, 2026
Merged

fix(managed_agents): self-close <img> tags so MDX build does not fail#509
PedramNavid merged 1 commit into
mainfrom
pedram/fix-managed-agents-img-tags

Conversation

@PedramNavid

@PedramNavid PedramNavid commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

Production cookbook deploy

This PR adds the trailing / on both. Once merged, re-running the cookbook-deploy GHA should publish cleanly.

The cookbook-deploy GHA converts notebooks to MDX, and the MDX parser
requires self-closing void tags. The two raw HTML <img> tags in
data_analyst_agent.ipynb and slack_data_bot.ipynb were missing the
trailing /, which broke the production build with:

  [@mdx-js/rollup] Expected a closing tag for `<img>` (256:1-256:193)
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

Notebook Changes

This PR modifies the following notebooks:

📓 managed_agents/data_analyst_agent.ipynb

View diff
nbdiff managed_agents/data_analyst_agent.ipynb (fa27d432a1899b26648a10244ff90ba2445d463b) managed_agents/data_analyst_agent.ipynb (8fd71595583c9d131085345ae9bfc83074c1f6d8)
--- managed_agents/data_analyst_agent.ipynb (fa27d432a1899b26648a10244ff90ba2445d463b)  (no timestamp)
+++ managed_agents/data_analyst_agent.ipynb (8fd71595583c9d131085345ae9bfc83074c1f6d8)  (no timestamp)
## modified /cells/11/source:
@@ -4,7 +4,7 @@ Open the session in the [Console](https://platform.claude.com/)
 under **Sessions** to watch every event, tool call, and token count
 live:
 
-<img src="https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/example_data/data_analyst_agent/console_session.png" alt="Session trace in the Console" width="700">
+<img src="https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/example_data/data_analyst_agent/console_session.png" alt="Session trace in the Console" width="700" />
 
 The helper below tails the same event stream, printing
 `agent.message` text and `agent.tool_use` calls as they arrive, and

📓 managed_agents/slack_data_bot.ipynb

View diff
nbdiff managed_agents/slack_data_bot.ipynb (fa27d432a1899b26648a10244ff90ba2445d463b) managed_agents/slack_data_bot.ipynb (8fd71595583c9d131085345ae9bfc83074c1f6d8)
--- managed_agents/slack_data_bot.ipynb (fa27d432a1899b26648a10244ff90ba2445d463b)  (no timestamp)
+++ managed_agents/slack_data_bot.ipynb (8fd71595583c9d131085345ae9bfc83074c1f6d8)  (no timestamp)
## modified /cells/9/source:
@@ -7,6 +7,6 @@ you're done.
 In any channel the bot is in, mention it with a CSV attached. It
 posts progress, then the summary and `report.html` in the thread:
 
-<img src="https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/example_data/slack_data_bot/slack_thread.png" alt="Slack thread showing the bot's analysis" width="600">
+<img src="https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/example_data/slack_data_bot/slack_thread.png" alt="Slack thread showing the bot's analysis" width="600" />
 
 Reply in-thread to go deeper on the same data.

Generated by nbdime

@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review

Recommendation: APPROVE

Summary

Fixes an MDX build failure by self-closing two <img> tags in Jupyter notebooks. MDX parses markup as JSX, which requires void elements like <img> to use self-closing syntax (<img ... />).

Actionable Feedback (0 items)

No issues found — the fix is correct and complete.

Detailed Review

Code Quality

Both <img> tags are correctly updated from HTML void syntax to JSX/MDX self-closing syntax in data_analyst_agent.ipynb and slack_data_bot.ipynb. The change is surgical and touches only the two affected lines.

Security

No security concerns.

Suggestions

None — this is a minimal, focused fix.

Positive Notes

  • Fix correctly targets both affected notebooks
  • PR description accurately diagnoses the root cause (MDX void-element requirement), includes the exact error message, and scopes the fix precisely
  • No collateral risk: no code cells, logic, imports, or model references changed

@PedramNavid PedramNavid merged commit a07d43d into main Apr 8, 2026
8 checks passed
martingarramon added a commit to martingarramon/claude-cookbooks that referenced this pull request Apr 10, 2026
…env var

- Add example_data/sre/logs/checkout-svc.txt — the SRE notebook uploads
  this file but it was missing, causing FileNotFoundError on run
  (uses .txt extension because .log is gitignored)
- Update sre_incident_responder.ipynb to reference the .txt extension
- Add load_dotenv() to CMA_operate_in_production.ipynb so .env users
  can load GITHUB_TOKEN (4 sibling notebooks already call it)
- Use COOKBOOK_MODEL env var in data_analyst_agent.ipynb, matching the
  pattern used by 7 other managed_agents notebooks

Follow-up from PR anthropics#508 bot reviews (code-level items not addressed by
anthropics#509, anthropics#511, anthropics#516 which fixed MDX rendering only).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant