Skip to content

πŸ™Œ OpenHands: AI-Driven Development

chore: mark security/ and resolver/ as Legacy V0 (#13062)

Engel Nyst25076ee44c8a
diff --git a/openhands/resolver/interfaces/azure_devops.py b/openhands/resolver/interfaces/azure_devops.py
index 94d15d7296..8cddc8c92d 100644
--- a/openhands/resolver/interfaces/azure_devops.py
+++ b/openhands/resolver/interfaces/azure_devops.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import base64
import re
from typing import Any
diff --git a/openhands/resolver/interfaces/bitbucket.py b/openhands/resolver/interfaces/bitbucket.py
index 3799f7f6bc..db9dae2caa 100644
--- a/openhands/resolver/interfaces/bitbucket.py
+++ b/openhands/resolver/interfaces/bitbucket.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import base64
from typing import Any
diff --git a/openhands/resolver/interfaces/forgejo.py b/openhands/resolver/interfaces/forgejo.py
index 44830a7b7a..bb7ffa5478 100644
--- a/openhands/resolver/interfaces/forgejo.py
+++ b/openhands/resolver/interfaces/forgejo.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
from __future__ import annotations
from typing import Any
diff --git a/openhands/resolver/interfaces/github.py b/openhands/resolver/interfaces/github.py
index 74add2f99f..7e62c7dc27 100644
--- a/openhands/resolver/interfaces/github.py
+++ b/openhands/resolver/interfaces/github.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
from typing import Any
import httpx
diff --git a/openhands/resolver/interfaces/gitlab.py b/openhands/resolver/interfaces/gitlab.py
index 26130fcb44..e8a0ec2ee9 100644
--- a/openhands/resolver/interfaces/gitlab.py
+++ b/openhands/resolver/interfaces/gitlab.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
from typing import Any
from urllib.parse import quote
diff --git a/openhands/resolver/interfaces/issue.py b/openhands/resolver/interfaces/issue.py
index c491acfd89..d57ce22412 100644
--- a/openhands/resolver/interfaces/issue.py
+++ b/openhands/resolver/interfaces/issue.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
from abc import ABC, abstractmethod
from typing import Any
diff --git a/openhands/resolver/interfaces/issue_definitions.py b/openhands/resolver/interfaces/issue_definitions.py
index a3b5b24c42..cf1125fe59 100644
--- a/openhands/resolver/interfaces/issue_definitions.py
+++ b/openhands/resolver/interfaces/issue_definitions.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import json
import os
import re
diff --git a/openhands/resolver/io_utils.py b/openhands/resolver/io_utils.py
index ce87bc625c..563d1c51ee 100644
--- a/openhands/resolver/io_utils.py
+++ b/openhands/resolver/io_utils.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import json
from typing import Iterable
diff --git a/openhands/resolver/issue_handler_factory.py b/openhands/resolver/issue_handler_factory.py
index 6369392a02..f1e38e35b0 100644
--- a/openhands/resolver/issue_handler_factory.py
+++ b/openhands/resolver/issue_handler_factory.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
from openhands.core.config import LLMConfig
from openhands.integrations.provider import ProviderType
from openhands.resolver.interfaces.azure_devops import AzureDevOpsIssueHandler
diff --git a/openhands/resolver/issue_resolver.py b/openhands/resolver/issue_resolver.py
index c5559ac828..68abc4bc1b 100644
--- a/openhands/resolver/issue_resolver.py
+++ b/openhands/resolver/issue_resolver.py
@@ -1,5 +1,12 @@
# flake8: noqa: E501
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import asyncio
import dataclasses
import json
diff --git a/openhands/resolver/patching/apply.py b/openhands/resolver/patching/apply.py
index 65db16c21a..69e14c9d21 100644
--- a/openhands/resolver/patching/apply.py
+++ b/openhands/resolver/patching/apply.py
@@ -1,5 +1,12 @@
# -*- coding: utf-8 -*-
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import os.path
import subprocess
import tempfile
diff --git a/openhands/resolver/patching/exceptions.py b/openhands/resolver/patching/exceptions.py
index 494d2b061a..08171587da 100644
--- a/openhands/resolver/patching/exceptions.py
+++ b/openhands/resolver/patching/exceptions.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
class PatchingException(Exception):
pass
diff --git a/openhands/resolver/patching/patch.py b/openhands/resolver/patching/patch.py
index 684a8a953c..8e9162627a 100644
--- a/openhands/resolver/patching/patch.py
+++ b/openhands/resolver/patching/patch.py
@@ -1,4 +1,11 @@
# -*- coding: utf-8 -*-
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import base64
import re
import zlib
diff --git a/openhands/resolver/patching/snippets.py b/openhands/resolver/patching/snippets.py
index 1c90f573df..9272a6f115 100644
--- a/openhands/resolver/patching/snippets.py
+++ b/openhands/resolver/patching/snippets.py
@@ -1,5 +1,12 @@
# -*- coding: utf-8 -*-
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import os
import re
from shutil import rmtree
diff --git a/openhands/resolver/resolve_issue.py b/openhands/resolver/resolve_issue.py
index cdd6d64943..a13ae2866d 100644
--- a/openhands/resolver/resolve_issue.py
+++ b/openhands/resolver/resolve_issue.py
@@ -1,5 +1,12 @@
# flake8: noqa: E501
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import asyncio
from openhands.resolver.issue_resolver import IssueResolver
diff --git a/openhands/resolver/resolver_output.py b/openhands/resolver/resolver_output.py
index 9394783ff0..5f853711ad 100644
--- a/openhands/resolver/resolver_output.py
+++ b/openhands/resolver/resolver_output.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
from typing import Any
from litellm import BaseModel
diff --git a/openhands/resolver/send_pull_request.py b/openhands/resolver/send_pull_request.py
index 23a7958b5f..c59b95c998 100644
--- a/openhands/resolver/send_pull_request.py
+++ b/openhands/resolver/send_pull_request.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import argparse
import json
import os
diff --git a/openhands/resolver/utils.py b/openhands/resolver/utils.py
index cc92223937..62475da897 100644
--- a/openhands/resolver/utils.py
+++ b/openhands/resolver/utils.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import logging
import multiprocessing as mp
import os
diff --git a/openhands/resolver/visualize_resolver_output.py b/openhands/resolver/visualize_resolver_output.py
index ca0717d840..c0c954ffed 100644
--- a/openhands/resolver/visualize_resolver_output.py
+++ b/openhands/resolver/visualize_resolver_output.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import argparse
import os
diff --git a/openhands/security/analyzer.py b/openhands/security/analyzer.py
index cb79f799ce..45f7c7fe9c 100644
--- a/openhands/security/analyzer.py
+++ b/openhands/security/analyzer.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
from typing import Any
from fastapi import Request
diff --git a/openhands/security/grayswan/analyzer.py b/openhands/security/grayswan/analyzer.py
index 7a6b288849..926e4710bf 100644
--- a/openhands/security/grayswan/analyzer.py
+++ b/openhands/security/grayswan/analyzer.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
"""GraySwan security analyzer for OpenHands."""
import asyncio
diff --git a/openhands/security/grayswan/utils.py b/openhands/security/grayswan/utils.py
index 22820a69dc..9989cd6208 100644
--- a/openhands/security/grayswan/utils.py
+++ b/openhands/security/grayswan/utils.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
"""Utility for converting OpenHands events to OpenAI message format."""
from typing import Any
diff --git a/openhands/security/invariant/analyzer.py b/openhands/security/invariant/analyzer.py
index 4808db9e7a..bba78e4ace 100644
--- a/openhands/security/invariant/analyzer.py
+++ b/openhands/security/invariant/analyzer.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import re
import uuid
from typing import Any
diff --git a/openhands/security/invariant/client.py b/openhands/security/invariant/client.py
index 64fcecce3d..e6d9f4c13f 100644
--- a/openhands/security/invariant/client.py
+++ b/openhands/security/invariant/client.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
import time
from typing import Any
diff --git a/openhands/security/invariant/nodes.py b/openhands/security/invariant/nodes.py
index d276406bd1..53d25e4402 100644
--- a/openhands/security/invariant/nodes.py
+++ b/openhands/security/invariant/nodes.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
from typing import Any, Iterable
from pydantic import BaseModel, Field
diff --git a/openhands/security/invariant/parser.py b/openhands/security/invariant/parser.py
index 01875e099b..b0b6af6b83 100644
--- a/openhands/security/invariant/parser.py
+++ b/openhands/security/invariant/parser.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
from pydantic import BaseModel, Field
from openhands.core.logger import openhands_logger as logger
diff --git a/openhands/security/invariant/policies.py b/openhands/security/invariant/policies.py
index 113d2f9265..f5410fcd87 100644
--- a/openhands/security/invariant/policies.py
+++ b/openhands/security/invariant/policies.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
DEFAULT_INVARIANT_POLICY = """from invariant.detectors import semgrep, secrets, CodeIssue
raise "Disallow secrets in bash commands [risk=medium]" if:
diff --git a/openhands/security/llm/analyzer.py b/openhands/security/llm/analyzer.py
index 1e886ca405..de8542b8c6 100644
--- a/openhands/security/llm/analyzer.py
+++ b/openhands/security/llm/analyzer.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
"""Security analyzer that uses LLM-provided risk assessments."""
from typing import Any
diff --git a/openhands/security/options.py b/openhands/security/options.py
index d0b1691f5c..d077297284 100644
--- a/openhands/security/options.py
+++ b/openhands/security/options.py
@@ -1,3 +1,10 @@
+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
+# - V1 application server (in this repo): openhands/app_server/
+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
+# Tag: Legacy-V0
from openhands.security.analyzer import SecurityAnalyzer
from openhands.security.grayswan.analyzer import GraySwanAnalyzer
from openhands.security.invariant.analyzer import InvariantAnalyzer