Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

FAQ: Did the Command Finish, or Did the Transcript?

Описание и применение

В статье описывается, как избежать ошибок при проверке завершения команд, выводимых чат‑ботами, используя скрипт‑обёртку, который сохраняет все артефакты процесса.

Задача

Developers rely on chat transcripts to determine if a command finished, but transcripts are lossy and may omit critical evidence such as exit codes, stderr, or process duration.

Результат

Implementing a capture wrapper ensures that every agent command produces verifiable evidence of completion, eliminating reliance on potentially truncated chat transcripts.

Рабочий процесс

  • 1. Wrap agent commands with a capture script that logs argv, cwd, env, start/end timestamps, stdout, stderr, and exit code.
  • 2. Store each run in a timestamped directory under a capture root.
  • 3. After execution, inspect the exit_code file to confirm success (0) or failure (non‑zero).
  • 4. Compare stdout.log and stderr.log sizes to detect omitted error output.
  • 5. Use the summary.json file to programmatically assess run duration and exit status.
  • 6. If exit_code or stderr.log are missing, treat the transcript as incomplete and request full logs from the server.

Доказательства

The transcript is a lossy view of a process, never the process.

Источник

Look for an exit code file. Look for a duration.

Источник

I use a small wrapper for every agent command.

Источник

  • Дата записи: 2026-09-18T12:30:44.250Z