fix(delegate): mark elided timeout-diagnostic goal and eval tool output

The subagent timeout diagnostic and the session_search eval harness still
appended a bare "...[truncated]" marker, the imitable wording #121548
replaced everywhere else. Route both through agent.compression_marker.elide
so every elision in the tree mints the same counted, guard-matched marker.

Salvaged from #122392 (only the two call-site hunks; base already ships
the elide helpers the PR re-defined). Refs #121572.
This commit is contained in:
Halldrix
2026-09-27 12:11:57 +05:30
committed by kshitij
parent a6686cc396
commit 0d4dbde837
2 changed files with 4 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ import threading
import time
from concurrent.futures import TimeoutError as FuturesTimeoutError
from typing import Any, Dict, List, Optional
from agent.compression_marker import elide
from agent.interrupt_compat import request_hard_interrupt
from dataclasses import dataclass, field
from tools import file_state
@@ -182,9 +183,7 @@ def _dump_subagent_timeout_diagnostic(
subagent_id = getattr(child, "_subagent_id", None) or f"idx{task_index}"
dump_path = logs_dir / f"subagent-timeout-{subagent_id}-{_dt.datetime.now().strftime('%Y%m%d_%H%M%S')}.log"
_goal_preview = (goal or "").strip()
if len(_goal_preview) > 1000:
_goal_preview = _goal_preview[:1000] + " ...[truncated]"
_goal_preview = elide((goal or "").strip(), 1000)
def _attr_line(attr):
try:
return f" {attr}: {getattr(child, attr, None)!r}"