Skip to content

bug: Async mode execution fails with exit code 1 #336

Closed

Description

@vybe

Summary

Async mode task execution fails with exit code 1 / "General error". Sessions are not persisted as a downstream effect.

Reproduction

pytest tests/test_parallel_task.py::TestAsyncModeExecution::test_async_mode_execution_completes -v

Error Details

Status: failed (expected: success)
Error: Task execution failed (exit code 1): General error

Investigation Needed

  1. Pull agent container logs during async mode execution
  2. Check if this is related to the execution_id unbound variable bug (#TBD)
  3. Verify async execution path correctly initializes all required variables

Affected Tests (3)

  • test_parallel_task.py::TestAsyncModeExecution::test_async_mode_execution_completes
  • test_dynamic_thinking_status.py::TestAsyncModeSubmission::test_async_mode_completes_eventually
  • test_dynamic_thinking_status.py::TestAsyncModeSessionPersistence::* (2 tests)

Labels

  • priority-p0
  • type-bug

Activity

  1. added
    priority-p0
    type-bug
    on Apr 14, 2026
  2. added
    status-in-progress
    on Apr 15, 2026
  3. vybe commented on Apr 15, 2026

    @vybe
    ContributorAuthor

    Resolution

    This issue was fixed in PR #343 (commit 4445193).

    Root Cause

    Async mode execution was returning an unhelpful "exit code 1: General error" message, masking the real underlying errors (billing issues, authentication failures, etc.).

    Fix Applied

    PR #343 added proper error detection and surfacing:

    • Added billing_error detection in Claude Code execution
    • Surfaced credit balance errors with helpful, actionable messages

    Verification

    • test_parallel_task.py::TestAsyncModeExecution::* — All 5 tests PASS
    • Async mode execution works correctly when credentials are properly configured
    • Error messages now clearly indicate the actual issue (e.g., "Credit balance is too low...")

    Note on Remaining Test Failures

    test_dynamic_thinking_status.py tests may still fail in some environments due to billing/credential issues. This is expected behavior — the test agent needs a valid subscription. The fix ensures these errors are now properly surfaced instead of being masked as "General error".

    Closing as fixed.

  4. removed
    status-in-progress
    on Apr 15, 2026
  5. added
    complexity-low
    on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-lowpriority-p0type-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions