Skip to content

feat(sandbox): surface agent transcript errors - #239

Draft
iamdhrv wants to merge 2 commits into
forge-sdlc:mainfrom
iamdhrv:agent/surface-transcript-errors
Draft

feat(sandbox): surface agent transcript errors#239
iamdhrv wants to merge 2 commits into
forge-sdlc:mainfrom
iamdhrv:agent/surface-transcript-errors

Conversation

@iamdhrv

@iamdhrv iamdhrv commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Change

  • persist tool status and model response metadata in Forge's existing
    .forge/history/<task>.json artifact
  • inspect the last three assistant turns plus intervening tool results after a
    non-zero container exit
  • surface explicit tool errors, token-limit stops, and assistant refusals at
    error level
  • always log the task-specific transcript path when history is available

Why

Container stderr often contains only startup noise. Forge already persists the
Deep Agents conversation, but the host runner did not consult it and omitted
the stop/status metadata needed to identify failures. The new parser uses that
existing task-scoped JSON artifact, bounds logged excerpts to 1,000 characters,
and leaves startup unaffected when history is missing or malformed.

Checks

  • uv run pytest -q tests/unit/sandbox/test_transcript_errors.py tests/unit/sandbox/test_runner_review_polling.py (31 passed)
  • uv run ruff check src/forge/sandbox/runner.py containers/entrypoint.py tests/unit/sandbox/test_transcript_errors.py
  • Python byte-compilation for both changed runtime modules
  • git diff --check

Fixes #79

iamdhrv added 2 commits July 30, 2026 09:53
Signed-off-by: Dhruv Maniya <dhruvmaniya1998@gmail.com>
Signed-off-by: Dhruv Maniya <dhruvmaniya1998@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: surface agent transcript errors on container failure

1 participant