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:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user