Skip to content

Commit f9a6afc

Browse files
committed
remove default prompt timeout in acpio
1 parent 5bb8135 commit f9a6afc

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

x/acpio/acpio.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"log/slog"
88
"strings"
99
"sync"
10-
"time"
1110

1211
acp "github.com/coder/acp-go-sdk"
1312
st "github.com/coder/agentapi/lib/screentracker"
@@ -16,9 +15,6 @@ import (
1615
// Compile-time assertion that ACPAgentIO implements st.AgentIO
1716
var _ st.AgentIO = (*ACPAgentIO)(nil)
1817

19-
// DefaultPromptTimeout is the maximum time to wait for an agent response.
20-
const DefaultPromptTimeout = 5 * time.Minute
21-
2218
// ACPAgentIO implements screentracker.AgentIO using the ACP protocol
2319
type ACPAgentIO struct {
2420
ctx context.Context
@@ -213,11 +209,8 @@ func (a *ACPAgentIO) Write(data []byte) (int, error) {
213209
a.logger.Debug("Aborting write", "error", err)
214210
return 0, err
215211
}
216-
// Use a timeout to prevent hanging indefinitely
217-
promptCtx, cancel := context.WithTimeout(a.ctx, DefaultPromptTimeout)
218-
defer cancel()
219212

220-
resp, err := a.conn.Prompt(promptCtx, acp.PromptRequest{
213+
resp, err := a.conn.Prompt(a.ctx, acp.PromptRequest{
221214
SessionId: a.sessionID,
222215
Prompt: []acp.ContentBlock{acp.TextBlock(text)},
223216
})

0 commit comments

Comments
 (0)