fix(code_execution): heartbeat is a background-only terminal modifier, blocked in the sandbox

The execute_code sandbox refuses background/notify modifiers on terminal(); heartbeat implies
notify and rides the same delivery path, so it joins the blocked set (and the stub-drift test's
mirror of it).
This commit is contained in:
teknium1
2026-09-21 11:12:41 -07:00
committed by Teknium
parent 65b0ff38ea
commit 9acd0d33b6
2 changed files with 2 additions and 2 deletions

View File

@@ -428,7 +428,7 @@ class TestStubSchemaDrift(unittest.TestCase):
# Parameters that are internal (injected by the handler, not user-facing)
_INTERNAL_PARAMS = {"task_id", "user_task"}
# Parameters intentionally blocked in the sandbox
_BLOCKED_TERMINAL_PARAMS = {"background", "pty", "notify", "notify_on_complete", "watch_patterns"}
_BLOCKED_TERMINAL_PARAMS = {"background", "pty", "notify", "notify_on_complete", "watch_patterns", "heartbeat"}
def test_stubs_cover_all_schema_params(self):
"""Every user-facing parameter in the real schema must appear in the

View File

@@ -22,7 +22,7 @@ from tools.registry import tool_error
logger = logging.getLogger("tools.code_execution_tool")
# Terminal parameters that must not be used from ephemeral sandbox scripts.
_TERMINAL_BLOCKED_PARAMS = {"background", "pty", "notify", "notify_on_complete", "watch_patterns"}
_TERMINAL_BLOCKED_PARAMS = {"background", "pty", "notify", "notify_on_complete", "watch_patterns", "heartbeat"}
def _default_dispatch(task_id):