Skip to content

acpx: apply_patch stuck in pending state after long conversations #22222

Description

@oldjs

Description

When using opencode via acpx in non-interactive (background) mode, after a session accumulates significant context (multiple rounds of continuation), apply_patch gets stuck in "pending" state indefinitely. The agent continues thinking and reading files but never actually writes anything.

Environment

  • opencode-ai: 1.4.3
  • acpx: 0.5.3
  • OS: Linux (container)
  • Model: gptloadopenai/glm (via ccload provider)
  • Mode: acpx non-interactive with --approve-all

Steps to Reproduce

  1. Create an acpx session: acpx --approve-all opencode -s mysession "task"
  2. Let the agent work for multiple rounds, accumulating context
  3. Continue the session with acpx --approve-all opencode -s mysession "continue"
  4. After 3-5 continuations, apply_patch starts showing "pending" but never completes
  5. Agent keeps thinking and reading but never writes files

Expected Behavior

apply_patch should complete and write files regardless of session length.

Actual Behavior

apply_patch stays pending forever. Only workaround is to kill the session and create a new one.

Related Issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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