Skip to content

chore: merge upstream opencode v1.2.20#87

Merged
kulvirgit merged 33 commits intomainfrom
merge/upstream-v1.2.20
Mar 7, 2026
Merged

chore: merge upstream opencode v1.2.20#87
kulvirgit merged 33 commits intomainfrom
merge/upstream-v1.2.20

Conversation

@kulvirgit
Copy link
Collaborator

Summary

  • Merge upstream opencode v1.2.20 (from v1.2.18 base)
  • Resolved 4 conflicts: package.json version, agent.ts bash streaming, auth.ts + worker.ts new imports
  • Fixed merge script to keep upstream packages instead of deleting them
  • Regenerated bun.lock

Upstream changes (v1.2.18 → v1.2.20)

  • Bash output streaming in ACP agent
  • Replaced Bun-specific APIs with Node.js equivalents (Bun.hash, Bun.write, Bun.sleep, Bun.stdin, etc.)
  • Git fsmonitor daemon leak fix
  • GPT-5.4 model support

Test plan

  • bun run build passes
  • bun test — 1432 pass, 51 fail (same as main, no new failures)
  • Typecheck — only pre-existing plugin/index.ts error (same as main)

fwang and others added 30 commits March 5, 2026 19:01
Co-Authored-By: Kai (Claude Opus 4.6) <noreply@anthropic.com>
# Conflicts:
#	packages/opencode/package.json
#	packages/opencode/src/acp/agent.ts
#	packages/opencode/src/cli/cmd/auth.ts
#	packages/opencode/src/cli/cmd/tui/worker.ts
Keep all upstream packages to avoid merge friction on future upstream merges.

Co-Authored-By: Kai (Claude Opus 4.6) <noreply@anthropic.com>
Co-Authored-By: Kai (Claude Opus 4.6) <noreply@anthropic.com>
kulvirgit and others added 3 commits March 6, 2026 15:48
- Accept upstream's version for skipFiles instead of `git rm`
- Remove `cleanSkippedPackages()` post-merge step
- Prevents merge friction on future upstream merges

Co-Authored-By: Kai (Claude Opus 4.6) <noreply@anthropic.com>
…ACP Agent

Required by upstream v1.2.20 bash output streaming feature.

Co-Authored-By: Kai (Claude Opus 4.6) <noreply@anthropic.com>
Post-merge now runs build, test, and typecheck before declaring
success. Stops on build failure; warns on test/typecheck failures
(since some may be pre-existing).

Co-Authored-By: Kai (Claude Opus 4.6) <noreply@anthropic.com>
Comment on lines +336 to 346
this.bashSnapshots.set(part.callID, hash)
}
content.push({
type: "content",
content: {
type: "text",
text: output,
},
})
}
await this.connection

This comment was marked as outdated.

@kulvirgit kulvirgit merged commit a6e1f2e into main Mar 7, 2026
4 of 9 checks passed
Comment on lines 346 to 348
await this.connection
.sessionUpdate({
sessionId,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The content variable, holding bash output, is created but not included in the sessionUpdate payload, preventing the output from being streamed to the client.
Severity: CRITICAL

Suggested Fix

Add the content variable to the update object within the this.connection.sessionUpdate call in the case "running" block. The line should be content, inside the update object literal.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: packages/opencode/src/acp/agent.ts#L346-L348

Potential issue: In the `handleEvent` function, the `case "running"` block for tool
calls correctly populates a `content` variable with new bash output. However, the
subsequent `this.connection.sessionUpdate` call that sends the update to the client
omits this `content` field from its payload. As a result, while the logic for detecting
new output and de-duplicating it is present, the actual output content is never
transmitted. This effectively breaks the bash output streaming feature, as the client
will not receive any updates for running commands.

@kulvirgit kulvirgit deleted the merge/upstream-v1.2.20 branch March 9, 2026 20:50
anandgupta42 pushed a commit that referenced this pull request Mar 17, 2026
chore: merge upstream opencode v1.2.20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants