codeep 1.2.76 → 1.2.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -148,9 +148,15 @@ export async function runAgentSession(opts) {
148
148
  if (result.finalResponse && chunksEmitted === 0) {
149
149
  opts.onChunk(result.finalResponse);
150
150
  }
151
- // Surface errors as thrown exceptions so index.ts can handle them correctly
151
+ // Surface errors as thrown exceptions so the ACP server can handle them correctly.
152
+ // Exception: if finalResponse was already sent as a chunk (e.g. "Agent reached the
153
+ // iteration limit", "Agent stopped due to repeated API timeouts"), don't also throw —
154
+ // the user already received the explanation and Zed would show a confusing second error.
152
155
  if (!result.success && !result.aborted) {
153
- throw new Error(result.error ?? 'Agent run failed without a specific error message');
156
+ const alreadyExplained = result.finalResponse && chunksEmitted > 0;
157
+ if (!alreadyExplained) {
158
+ throw new Error(result.error ?? 'Agent run failed without a specific error message');
159
+ }
154
160
  }
155
161
  if (result.aborted) {
156
162
  const abortError = new Error('Agent session was cancelled');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.2.76",
3
+ "version": "1.2.77",
4
4
  "description": "AI-powered coding assistant built for the terminal. Multiple LLM providers, project-aware context, and a seamless development workflow.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",