diff --git a/archivebox/opencode/templates/opencode/agent.html b/archivebox/opencode/templates/opencode/agent.html
index 8a252295..d911ec57 100644
--- a/archivebox/opencode/templates/opencode/agent.html
+++ b/archivebox/opencode/templates/opencode/agent.html
@@ -206,6 +206,42 @@
});
})();
+
{% endif %}
{% endblock %}
diff --git a/archivebox/tests/test_opencode_agent.py b/archivebox/tests/test_opencode_agent.py
index b0ee9d2d..babd208d 100644
--- a/archivebox/tests/test_opencode_agent.py
+++ b/archivebox/tests/test_opencode_agent.py
@@ -186,6 +186,8 @@ def test_opencode_agent_superuser_gets_admin_wrapper(admin_client, live_opencode
assert f'