import json,pathlib,sys
r=json.loads((pathlib.Path(__file__).parent/(sys.argv[1]+'-runtime.json')).read_text())
print('\033[2J\033[H',end='')
print(f"{r['side'].upper()} | {r['commit'][:10]} | Native transcript text (metadata omitted)")
print('Linux web / Chromium 1280x1000 / light / Claude Haiku 5.5')
print(f"Original session resumed: {r['sameNativeSession']} | manual_context handoffs: {len(r['handoffs'])}")
print(f"Original prompt occurrences in native user messages: {r['originalPromptOccurrences']}")
for i,m in enumerate(r['nativeMessages'],1):
 if 'Context handoff (manual_context)' in m['text']:
  print(f'{i}. USER: Context handoff (manual_context):')
  print('   [Historical user] Remember the code word PELICAN. Reply only OK.')
  print('   [Historical assistant] OK')
  print('   User message: What was the code word? Reply with just the word.')
 else: print(f"{i}. {m['role'].upper()}: {m['text']}")
