GeezerVison is showing github.com — upstream: provider/security fixes not yet ported · Issue #1478 · AltimateAI/altimate-code
upstream: provider/security fixes not yet ported #1478DescriptionTracking issue for the weekly upstream security/provider fix port. Fork base: OpenCode v1.17.9 (#964, frozen 2026-07-18). Upstream reviewed through v1.19.6 plus upstream dev fixes to 2026-11-25 (dev is now the v2 layout, no packages/opencode). Scope: fixes in packages/opencode/src/{provider,session,tool,mcp,auth,plugin}, packages/core, the server auth/PTY surface and AI SDK provider bumps.
Run 2026-11-25
Base unchanged: still v1.17.9 (#964); no newer full upstream merge. Upstream tags now reach v1.19.6; dev is still v2-only, so fixes were checked against the fork's v1 code by behavior.
Ported
Already present
Not applicable
Still open (not merged)
- fix(bedrock): non-empty Converse streams in the release build and cached tokens billed once #1425, fix(session): recover from stalled model requests #1426, fix(mcp): port upstream OAuth callback loopback bind (anomalyco/opencode#30022) #1476, fix(provider): port upstream 5min OpenAI header timeout (anomalyco/opencode#37770) #1477, fix(mcp): port upstream auth status scoping to configured server URL (anomalyco/opencode#33924) #1612, fix(session): port upstream malformed model cost guard (anomalyco/opencode#43248) #1613, fix(server): port upstream PTY connect route authorization (anomalyco/opencode#58258) #1615, fix(tui): port upstream failed RPC request reply (anomalyco/opencode#54936) #1617, fix(tool): port upstream webfetch redirect rule checks (anomalyco/opencode#59748) #1660, fix(provider): port upstream Bedrock unsigned reasoning filter (anomalyco/opencode#45769) #1661, fix(session): port upstream bounded history images (anomalyco/opencode#62270) #1714, fix(provider): port upstream Bedrock tool-result image hoisting (anomalyco/opencode#50272) #1715, fix(permission): port upstream case-insensitive file permission matching on macOS (anomalyco/opencode#64626) #1842, fix(provider): port upstream LiteLLM context overflow detection (anomalyco/opencode#60692) #1844
Queued (ranked)
- fix(ai): apply HTTP timeouts to all requests anomalyco/opencode#64692: apply HTTP header/body timeouts to every AI request, not only OpenAI. Hang. Spans many v2 AI SDK files; adapt after fix(provider): port upstream 5min OpenAI header timeout (anomalyco/opencode#37770) #1477 and fix(session): recover from stalled model requests #1426 land
- fix(opencode): retry raw network finish errors anomalyco/opencode#43813: retry raw
network_error finish reasons. Retry. Waiting on fix(session): recover from stalled model requests #1426
- fix(opencode): expand retryable error patterns anomalyco/opencode#40707 / #40694 / #43806 / #59816: broaden retryable error patterns, keep exhausted request rate limits retryable (
session/retry.ts). Retry. Waiting on fix(session): recover from stalled model requests #1426
- fix(opencode): cap session retries with jitter anomalyco/opencode#41939: retry jitter. Retry. Touches
session/retry.ts, which fix(session): recover from stalled model requests #1426 also changes
- fix(core): frame MCP stdio messages without the SDK read buffer anomalyco/opencode#60694 / #60490 / #61149: MCP stdio framing, wait for MCP servers still starting, mark an invalid-URL server as failed. Hang. v2 code; needs a v1 port in
mcp/index.ts
- fix(cli): reject FIFO attachments without blocking anomalyco/opencode#64696: open FIFO attachments nonblocking before the regular-file check (
cli/cmd/run.ts reads the path directly, so a FIFO can block). Hang
- fix(core): use the localhost redirect when an MCP OAuth server rewrites 127.0.0.1 anomalyco/opencode#63403: accept OAuth callbacks the browser rewrote from
127.0.0.1 to localhost (mcp/oauth-provider.ts registers only 127.0.0.1). Auth
- fix(ai): classify OpenAI cyber_policy refusals as content policy anomalyco/opencode#64844: classify OpenAI
cyber_policy refusals as content-policy errors. OpenAI
- fix(ai): replay undeclared tool call names in provider-safe form anomalyco/opencode#65292: sanitize undeclared tool names before provider replay. Provider correctness
- fix(core): keep ChatGPT sharing safeguards when a token refresh fails anomalyco/opencode#64470: keep ChatGPT sharing safeguards when the token refresh fails. Check against fork
plugin/codex.ts
- AI SDK provider bumps: needs a dedicated PR plus a regression run (versions in the 2026-10-14 run)
- fix(opencode): retry xAI capacity stream errors anomalyco/opencode#43640: xAI capacity errors retryable. Other provider
- fix(core): expand ~ in a local MCP server's cwd anomalyco/opencode#61496: expand
~ in a local MCP server's cwd. Other
- fix(core): default a zero shell timeout and stop timed-out background commands anomalyco/opencode#63703: shell timeout for automatically backgrounded commands. Other; check against fork
tool/bash.ts
- fix(core): limit subagent nesting depth anomalyco/opencode#37124: subagent recursion depth limit. Design-level, note only
Summary
Ported 2: macOS case-insensitive file permission rules (#64626 → #1842) and LiteLLM overflow detection (#60692 → #1844); review requested from @anandgupta42 on both.
New tests fail on main and pass with the fixes; packages/opencode typecheck (tsgo --singleThreaded), analyze.ts --markers --strict (pattern fallback) and the tracker-leak check pass.
Next: HTTP timeouts for all requests (#64692) and the retry items once #1426 merges; none of the 14 open port PRs has merged yet. Run note: git proxy and Devin's PR tool still fail (403/Unauthorized), so git went direct to github.com and PRs were opened via the REST API.
Written by Devin
Run 2026-11-11
Base unchanged: still v1.17.9. No newer full upstream merge has landed; the last one is #964. Upstream dev is v2-only, so new dev fixes were checked against the fork's v1 code by behavior.
Ported
Not applicable
- Upstream file-download content-type/CSP hardening: targets the v2
packages/server route the fork doesn't ship. The fork's server/instance.ts only serves its embedded UI
Still open (not merged)
Queued (ranked)
- fix(opencode): retry raw network finish errors anomalyco/opencode#43813: retry raw
network_error finish reasons. Retry. Port after fix(session): recover from stalled model requests #1426 lands
- fix(opencode): expand retryable error patterns anomalyco/opencode#40707 / #40694 / #43806: broaden retryable error patterns (
session/retry.ts). Retry. Waiting on fix(session): recover from stalled model requests #1426
- fix(opencode): cap session retries with jitter anomalyco/opencode#41939: retry jitter. Retry. Touches
session/retry.ts, which fix(session): recover from stalled model requests #1426 also changes
- fix(core): frame MCP stdio messages without the SDK read buffer anomalyco/opencode#60694 / #60490 / #61149: MCP stdio framing, wait for MCP servers that are still starting, mark an invalid-URL server as failed. Hang. v2 code; check against fork
mcp/index.ts
- AI SDK provider bumps: needs a dedicated PR plus a regression run (versions listed in the 2026-10-14 run)
- fix(ai): recognize LiteLLM context overflow errors anomalyco/opencode#60692: LiteLLM
context window exceeded overflow pattern (provider/error.ts). Other provider, one-line port. Still missing
- fix(opencode): retry xAI capacity stream errors anomalyco/opencode#43640: xAI capacity errors retryable. Other provider
- fix(core): expand ~ in a local MCP server's cwd anomalyco/opencode#61496: expand
~ in a local MCP server's cwd. Other
- fix(core): limit subagent nesting depth anomalyco/opencode#37124: subagent recursion depth limit. Design-level, note only
Summary
Ported 2: bounded history images plus oversized-image overflow (#62270 → #1714) and Bedrock tool-result image hoisting (#50272 → #1715). Review requested from @anandgupta42 on both.
New tests fail on main and pass with the fixes. The full bun typecheck passes (13/13, run with --concurrency=1 to avoid OOM). analyze.ts --markers --strict also passes, but with upstream/dev on v2 it checks nothing, so it was re-run against a v1.17.9 mirror (clean).
Next: the retry items once #1426 merges, then the MCP hang items. Run note: the git proxy and Devin's PR tool still fail (403/Unauthorized), so git went direct to github.com and PRs were opened via the REST API. 2 tests in tool-result-bigint/session.test.ts (scratch store) fail on clean main.
Written by Devin
Run 2026-11-04
Base unchanged: still v1.17.9. No newer full upstream merge has landed; the last one is #964. There is no upstream tag after v1.19.5. Upstream dev dropped packages/opencode (v2 packages/core/packages/ai), so new dev fixes were checked against the fork's v1 code by behavior.
Ported
Not applicable
- Code Mode fetch redirect/permission fixes (#60502, #59954): the fork doesn't ship Code Mode
- v2 runner, schedules, image generation and Console skill fixes (#61015, #60660, #59934, #60349, #60256, #61074): features the fork's v1 runtime doesn't have
Still open (not merged)
Queued (ranked)
- fix(opencode): retry raw network finish errors anomalyco/opencode#43813: retry raw
network_error finish reasons. Retry. Port after fix(session): recover from stalled model requests #1426 lands
- fix(opencode): expand retryable error patterns anomalyco/opencode#40707 / #40694 / #43806: broaden retryable error patterns (
session/retry.ts). Retry. Waiting on fix(session): recover from stalled model requests #1426
- fix(opencode): cap session retries with jitter anomalyco/opencode#41939: retry jitter. Retry. Touches
session/retry.ts, which fix(session): recover from stalled model requests #1426 also changes
- fix(core): frame MCP stdio messages without the SDK read buffer anomalyco/opencode#60694 / #60490 / #61149: MCP stdio framing, wait for starting MCP servers, invalid-URL server marked failed. Hang. v2 code; check against fork
mcp/index.ts
- fix(opencode): hoist Bedrock tool images except Claude, Nova, and Llama 4 anomalyco/opencode#50272: Bedrock tool-result images. Bedrock
- AI SDK provider bumps: needs a dedicated PR plus a regression run (versions listed in the 2026-10-14 run)
- fix(ai): recognize LiteLLM context overflow errors anomalyco/opencode#60692: LiteLLM
context window exceeded overflow pattern (provider/error.ts). Other provider, one-line port
- fix(opencode): retry xAI capacity stream errors anomalyco/opencode#43640: xAI capacity errors retryable. Other provider
- fix(core): expand ~ in a local MCP server's cwd anomalyco/opencode#61496: expand
~ in a local MCP server's cwd. Other
- fix(core): limit subagent nesting depth anomalyco/opencode#37124: subagent recursion depth limit. Design-level, note only
Summary
Ported 2: webfetch redirect/credential permission checks (#59748/#61701/#60505 → #1660) and the Bedrock unsigned-reasoning filter (#45769 → #1661). Review requested from @anandgupta42 on both.
New tests fail on main and pass with the fixes. tsgo (opencode), the pre-push bun typecheck and analyze.ts --markers --strict are clean.
Next: the retry items once #1426 merges, then the MCP hang items. Run note: the git proxy and Devin's PR tool still fail (403/Unauthorized), so git went direct to github.com and PRs were opened via the REST API.
Written by Devin
Run 2026-10-28
Base unchanged: still v1.17.9. No newer full upstream merge has landed; the last one is #964.
Ported
Opened from last run's branches
Not applicable
Still open (not merged)
Queued (ranked)
- fix(opencode): retry raw network finish errors anomalyco/opencode#43813: retry raw
network_error finish reasons. Retry. Port after fix(session): recover from stalled model requests #1426 lands
- fix(opencode): expand retryable error patterns anomalyco/opencode#40707 / #40694 / #43806: broaden retryable error patterns (
session/retry.ts). Retry. Waiting on fix(session): recover from stalled model requests #1426
- fix(opencode): cap session retries with jitter anomalyco/opencode#41939: retry jitter. Retry
- fix(provider): filter unreplayable Bedrock reasoning before caching anomalyco/opencode#45769: drop unsigned Bedrock reasoning before caching. Bedrock. Check against fix(bedrock): non-empty Converse streams in the release build and cached tokens billed once #1425
- fix(opencode): hoist Bedrock tool images except Claude, Nova, and Llama 4 anomalyco/opencode#50272: Bedrock tool-result images. Bedrock
- AI SDK provider bumps: needs a dedicated PR plus a regression run (versions listed in the 2026-10-14 run)
- fix(opencode): retry xAI capacity stream errors anomalyco/opencode#43640: xAI capacity errors retryable. Other provider
- fix(core): limit subagent nesting depth anomalyco/opencode#37124: subagent recursion depth limit. Design-level, note only
Summary
Ported 2: PTY connect route authorization (#58258 → #1615) and the failed-RPC TUI hang (#54936 → #1617); also opened last run's MCP auth (#1612) and malformed-cost (#1613) PRs. Review requested from @anandgupta42 on all four.
New tests fail on main and pass with the fixes; tsgo (opencode, server) and analyze.ts --markers --strict are clean locally.
Next: #43813 and the retry patterns once #1426 merges, then the Bedrock items. Run note: git proxy still 403s, so branches were pushed via the GitHub REST API.
Written by Devin
Run 2026-10-21
Base unchanged: still v1.17.9. No newer full upstream merge has landed; the last one is #964.
Ported (branch pushed; PR still needs opening, see run note)
Already present
Still open from last run
Queued (ranked)
- fix(opencode): retry raw network finish errors anomalyco/opencode#43813: retry raw
network_error finish reasons (session/llm/ai-sdk.ts). Retry. It also needs upstream's generic ResponseStreamError → retryable APIError mapping in message-v2.ts, and fix(session): recover from stalled model requests #1426 deliberately limits that mapping to the idle watchdog. Port after fix(session): recover from stalled model requests #1426 lands
- fix(opencode): expand retryable error patterns anomalyco/opencode#40707 / #40694 / #43806: broaden retryable error patterns (
session/retry.ts). Retry. Waiting on fix(session): recover from stalled model requests #1426
- fix(opencode): cap session retries with jitter anomalyco/opencode#41939: retry jitter. Retry
- fix(provider): filter unreplayable Bedrock reasoning before caching anomalyco/opencode#45769: drop unsigned Bedrock reasoning before caching. Bedrock. Check against fix(bedrock): non-empty Converse streams in the release build and cached tokens billed once #1425
- fix(opencode): hoist Bedrock tool images except Claude, Nova, and Llama 4 anomalyco/opencode#50272: Bedrock tool-result images. Bedrock
- AI SDK provider bumps: needs a dedicated PR plus a regression run (versions listed in the 2026-10-14 run)
- fix(opencode): retry xAI capacity stream errors anomalyco/opencode#43640: xAI capacity errors retryable. Other provider
- fix(core): limit subagent nesting depth anomalyco/opencode#37124: subagent recursion depth limit. Design-level, note only
Summary
Ported 2 fixes onto branches: MCP auth URL scoping (#33924 → #1572) and the malformed-cost guard (#43248 → #1573). Tests fail on main and pass with the fixes; tsgo and analyze.ts --markers --strict are clean.
The PRs could not be opened: Devin's PR tool returned Unauthorized and the git proxy returned 403. A maintainer can open them from the compare links above.
Next: #43813 and the retry patterns once #1426 merges, then the Bedrock items.
Note: session/session.ts has a second getUsage copy that nothing imports (callers use session/index.ts). It was left untouched.
Run 2026-10-14
Ported
Covered by an open fork PR (skipped)
Already present
Not applicable
- Core
read tool fix (1ac6b4b): the fork runs the opencode tool implementation, not the core one
- Core runner fixes (49593c1, 709af58, 0033bb3): they target the upstream v2 runner, which the fork doesn't ship
- fff / codemode / Copilot / Codex / Mistral variant fixes: features or providers the fork doesn't carry at this base
Queued (ranked)
- fix(mcp): scope auth status to server URL anomalyco/opencode#33924: scope MCP auth status to the configured server URL (
mcp/index.ts getAuthStatus uses auth.get instead of auth.getForUrl). Security
- fix(provider): handle SSE reader cancel rejections anomalyco/opencode#44944: catch rejected
reader.cancel(err) promise in the SSE watchdog (provider.ts), avoiding an unhandled rejection after a stall. Hang
- fix(opencode): expand retryable error patterns anomalyco/opencode#40707 / #40694 / #43806: broaden retryable provider/network error patterns (
session/retry.ts). Retry. Overlaps fix(session): recover from stalled model requests #1426, so wait for it to land
- fix(opencode): retry raw network finish errors anomalyco/opencode#43813: retry raw
network_error finish reasons. Retry
- fix(opencode): cap session retries with jitter anomalyco/opencode#41939: retry jitter and capped retry policy. Retry. The fork already caps at
RETRY_MAX_ATTEMPTS = 5, so only jitter is missing
- fix(session): ignore malformed model costs anomalyco/opencode#43248: ignore malformed (non-finite) model cost fields in
Session.getUsage. Cost
- fix(provider): filter unreplayable Bedrock reasoning before caching anomalyco/opencode#45769: drop unsigned/unreplayable Bedrock reasoning before caching (
provider/transform.ts). Bedrock. Check against fix(bedrock): non-empty Converse streams in the release build and cached tokens billed once #1425 first
- fix(opencode): hoist Bedrock tool images except Claude, Nova, and Llama 4 anomalyco/opencode#50272: Bedrock tool-result images. Bedrock
- AI SDK provider bumps (needs a dedicated PR + regression run): amazon-bedrock 4.0.112 -> 4.0.166, anthropic 3.0.82 -> 3.0.111, openai 3.0.53 -> 3.0.88, azure 3.0.49 -> 3.0.93, xai 3.0.82 -> 3.0.139, togetherai 2.0.41 -> 2.0.68, google-vertex 4.0.128 -> 4.0.181, gateway 3.0.104 -> 3.0.191
- fix(opencode): retry xAI capacity stream errors anomalyco/opencode#43640: xAI capacity errors retryable. Other provider
- fix(core): limit subagent nesting depth anomalyco/opencode#37124: subagent recursion depth limit (
tool/task.ts). Design-level; note only
Summary
Ported 2: MCP OAuth loopback bind (#1476) and OpenAI 5min header timeout (#1477). #46903 and the Bedrock fixes are skipped because open PRs #1426 and #1425 already cover them.
Top of the queue: MCP auth URL scoping (#33924), then SSE cancel rejection (#44944) and the retry-pattern ports once #1426 merges.
Run note: git clone/push through the git proxy returned 403, so branches were pushed via the GitHub REST API, and analyze.ts used its pattern fallback because upstream couldn't be fetched.
Written by Devin MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|