Skip to content

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

Merged
eshulman2 merged 2 commits into
forge-sdlc:mainfrom
iamdhrv:agent/surface-transcript-errors
Aug 23, 2026
Merged

feat(sandbox): surface agent transcript errors#239
eshulman2 merged 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

Signed-off-by: Dhruv Maniya <dhruvmaniya1998@gmail.com>
Signed-off-by: Dhruv Maniya <dhruvmaniya1998@gmail.com>
@eshulman2
eshulman2 force-pushed the agent/surface-transcript-errors branch from d23b3dc to 9a9ba79 Compare August 23, 2026 09:47

@eshulman2 eshulman2 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased onto current main and reviewed the conflict resolution and resulting diff. The container-driver refactor is preserved, transcript extraction is wired to ExecResult, and focused tests plus Ruff checks pass. No blocking findings.

@eshulman2
eshulman2 marked this pull request as ready for review August 23, 2026 09:48
@eshulman2
eshulman2 merged commit 56f58a9 into forge-sdlc:main Aug 23, 2026
8 checks passed
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

2 participants