C.W.K.
Stream
Lesson 03 of 05 · published

Tool Result는 dump 말고 summary

~24 min · tools, summaries, noise

Level 0Window Watcher
0 XP0/50 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

Tool이 context 오염 가능

20,000 line 반환하는 tool은 기술적으로 성공이고 운영적으로 해롭다. 모형이 그 blob을 미래 turn에 carry해야 — 거기서 actual task와 경쟁. Long session은 tool dump 누적해 모든 중요한 게 tar -tvf output에 묻혀.

Task-shaped tool result

좋은 tool은 task-shaped 관찰 반환 — 뭐 바뀌었나, 뭐 실패했나, 관련 line, count, path, 다음 제안 check. Raw output은 파일이나 log에, 필요할 때만 slice 로드. Summary는 evidence 보존 — line number, command, exit code — 전체 flood를 미래 turn 다 끌고 가지 말고.

Compact는 vague 아니야

Summary는 모형이 reason 가능하게. 'Tests failed' 너무 compact. '2 failing tests in auth/session.spec.ts at lines 42 (expected 401 got 200) and 88 (timeout)'이 맞는 density.

거대한 tool dump는 모든 미래 turn의 context 세금.

Code

Task-shaped tool result·yaml
tool_result:
  command: "npm test"
  exit_code: 1
  summary: "2 failing tests in auth/session.spec.ts"
  evidence:
    - "auth/session.spec.ts:42 expected 401 got 200"
    - "auth/session.spec.ts:88 timeout waiting for logout"
  raw_log_path: "/tmp/run-123.log"
Noisy tool용 wrapper·python
def shape_test_output(raw_stdout: str) -> dict:
    failures = parse_failures(raw_stdout)
    return {
        "exit_code": last_exit_code(),
        "summary": f"{len(failures)} failing tests",
        "evidence": [f"{f.path}:{f.line} {f.message}" for f in failures[:10]],
        "raw_log_path": dump_raw_to_tmp(raw_stdout),
    }

External links

Exercise

Noisy 명령 output 골라 summary + evidence + raw log pointer 있는 task-shaped tool result로 다시 써.
Hint
중요한 line은 정확히 keep. Decorative flood drop.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.