Skip to content

[Bug] Claude ACP complex sessions have slow responses, incomplete cancellation, tool-call errors, and artifact finalization failures #721

Description

@yshtonytc

Summary

Open Science works for simple Claude requests, but complex research sessions expose several reliability problems with the Claude Code ACP backend.

Environment

  • OS: Windows 11
  • Open Science: 0.8.0 (development/headless backend)
  • ACP framework: Claude Code
  • Model: claude-opus-5
  • Anthropic-compatible base URL: https://v2.pincc.ai
  • Permission profile: full

Problems observed

  1. Slow first response: ACP connects and creates the session successfully, but complex prompts can wait many minutes before the first tool call. Simple control requests complete within seconds.

  2. Cancellation does not fully stop the run: after the external runner is stopped, the underlying ACP session may remain status: running and continue producing events, leaving an orphaned session.

  3. Tool-call validation/transport errors: examples include:

    • Write failed: An unexpected parameter code was provided
    • Edit failed: String to replace not found in file
    • Write was called with input that could not be parsed as JSON
  4. Artifact finalization failure: a model turn can finish with stopReason=end_turn, followed by:

    • artifact finalization attempt failed
    • failureKind=invalid-proof
    • durableFinalizationCompleted=false

Expected behavior

  • Expose progress or heartbeat while a complex first response is pending.
  • Fully terminate ACP sessions and child processes on cancellation.
  • Validate and serialize Claude tool calls according to the ACP tool schema.
  • Finalize artifacts after a normal model completion, or return actionable recovery guidance.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions