Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
413 commits
Select commit Hold shift + click to select a range
c352677
fix(app,ui): session review reactivity and VCS query cache (#30660)
Brendonovich Jun 4, 2026
76ee87e
feat(core): add embedded v2 session runtime and tool foundation (#30632)
kitlangton Jun 4, 2026
b0a9294
chore: generate
opencode-agent[bot] Jun 4, 2026
b6305cb
chore: update nix node_modules hashes
opencode-agent[bot] Jun 4, 2026
9251e5d
docs: correct compaction prune default (#30670)
rekram1-node Jun 4, 2026
2a33add
fix(opencode): avoid shell cancel race (#30641)
rekram1-node Jun 4, 2026
9f42bd4
feat: bump bedrock and add proper mantle support for openai models th…
rekram1-node Jun 4, 2026
74a27db
test: wait for shell truncation readiness (#30679)
rekram1-node Jun 4, 2026
51fd7c0
chore: update nix node_modules hashes
opencode-agent[bot] Jun 4, 2026
70bb710
refactor(opencode): clean up task tool prompts (#30687)
rekram1-node Jun 4, 2026
1ff1910
feat(core): add command registry (#30624)
thdxr Jun 4, 2026
30ec231
chore: generate
opencode-agent[bot] Jun 4, 2026
69cfc44
fix(acp): replay loaded session transcript (#30645)
opencode-agent[bot] Jun 4, 2026
caea930
fix(core): reset pre-launch session projections (#30728)
kitlangton Jun 4, 2026
6d4f3b4
feat(tui): improve experimental session switcher (#30738)
nexxeln Jun 4, 2026
7e09660
fix(opencode): respect disabled auto compaction on overflow (#30749)
nexxeln Jun 4, 2026
f5d1ae6
zen: nemotron 3 ultra
fwang Jun 4, 2026
789e4d5
fix(enterprise): install hono standard validator peer (#30740)
opencode-agent[bot] Jun 4, 2026
7f54b1b
fix build
thdxr Jun 4, 2026
9f3a0fe
chore: update nix node_modules hashes
opencode-agent[bot] Jun 4, 2026
94c49b2
make scripts executable
thdxr Jun 4, 2026
cb65926
fix(tui): show toast when variant_list keybind used with no variants …
ariane-emory Jun 4, 2026
21a0fdd
fix(opencode): `ACP.loadSession` should replay all messages (#30761)
imnotlxy Jun 4, 2026
730ea6d
fix(opencode): attribute task child agent on creation (#30786)
rekram1-node Jun 4, 2026
5b14fb4
fix(tui): add Vue syntax highlighting (#30802)
rekram1-node Jun 4, 2026
e45e0e1
fix: bump @openrouter/ai-sdk-provider to 2.9.0 (#30800)
colinhacks Jun 4, 2026
ba1b660
feat(core): moving sessions (#30640)
jlongster Jun 4, 2026
fe5ac30
chore: generate
opencode-agent[bot] Jun 4, 2026
cc9b73b
tweak: background agent prompting to avoid polling issues (#30790)
rekram1-node Jun 4, 2026
e464999
upgrade opentui to 0.3.2 (#30748)
kommander Jun 4, 2026
1071807
chore: update nix node_modules hashes
opencode-agent[bot] Jun 4, 2026
b1a7ee5
feat(desktop): surface local server startup failures (#30822)
Hona Jun 4, 2026
057958c
ci: publish
thdxr Jun 4, 2026
76ecf2e
refactor(core): make v2 session inputs event sourced (#30785)
kitlangton Jun 4, 2026
ab5a12d
chore: generate
opencode-agent[bot] Jun 4, 2026
f011d77
fix(llm): normalize OpenAI function tool schemas
kitlangton Jun 4, 2026
134f413
chore: generate
opencode-agent[bot] Jun 4, 2026
47f3d8b
feat(stats): refresh stats routes and homepage (#30419)
adamdotdevin Jun 5, 2026
46e9863
fix(stats): sort metric charts by top usage
adamdotdevin Jun 4, 2026
773d33e
feat(core): add public native API (#30828)
kitlangton Jun 5, 2026
7555700
chore: generate
opencode-agent[bot] Jun 5, 2026
605ae48
feat(app): color themes (#30824)
arvsrn Jun 5, 2026
9211ef7
chore: generate
opencode-agent[bot] Jun 5, 2026
17ba553
sync release versions for v1.16.0
Jun 5, 2026
64dc6d3
feat(core): attach global native tools (#30832)
kitlangton Jun 5, 2026
39babcb
chore: generate
opencode-agent[bot] Jun 5, 2026
2859ce6
feat(core): add Snowflake Cortex provider (#29901)
kameshsampath Jun 5, 2026
c47cb28
chore: generate
opencode-agent[bot] Jun 5, 2026
1af8daf
feat(core): persist v2 session context epochs (#30789)
kitlangton Jun 5, 2026
8c0edca
chore: generate
opencode-agent[bot] Jun 5, 2026
3003867
feat(tui): allow backgrounding synchronous subagents (#30488)
kitlangton Jun 5, 2026
5426478
fix(app): improve tab handling (#30669)
Brendonovich Jun 5, 2026
0a36433
chore: generate
opencode-agent[bot] Jun 5, 2026
b375890
fix(tui): prioritize models slash autocomplete (#30848)
rekram1-node Jun 5, 2026
3cf1cef
fix(tui): route permission replies to session directory (#30851)
opencode-agent[bot] Jun 5, 2026
b01eb22
fix(cli): harden daemon lifecycle (#30844)
thdxr Jun 5, 2026
7ae856a
chore: generate
opencode-agent[bot] Jun 5, 2026
7f33576
feat(app): improve desktop multi-server support (#30678)
Hona Jun 5, 2026
f6197ce
chore: generate
opencode-agent[bot] Jun 5, 2026
9431356
fix(app): handle tab overflow and scrolling in titlebar (#30886)
Brendonovich Jun 5, 2026
c613c33
fix(app): tab overflow (#30894)
Brendonovich Jun 5, 2026
b278e49
tui: guard path formatting inputs (#30469)
simonklee Jun 5, 2026
0c0d193
opencode/run: refresh themes after terminal reloads (#30917)
simonklee Jun 5, 2026
a468680
chore: generate
opencode-agent[bot] Jun 5, 2026
dc985ff
fix(tui): fall back to local cwd when editor spawns in attach mode (#…
pcadena-lila Jun 5, 2026
d721fc0
docs: update Go Qwen tiered pricing (#30936)
MrMushrooooom Jun 5, 2026
edbe228
chore: generate
opencode-agent[bot] Jun 5, 2026
7a4d183
feat(tui): add diff hunk navigation (#30935)
nexxeln Jun 5, 2026
a136caa
chore: rm fuzzy search on references (#30931)
nexxeln Jun 5, 2026
a261b55
fix: use mapError instead of orDie for context snapshot decoding (#30…
weiconghe Jun 5, 2026
0ee7cfa
fix(core): recover corrupted models cache (#30947)
nexxeln Jun 5, 2026
48106b7
chore: bun install (#30968)
rekram1-node Jun 5, 2026
1e216e1
fix(opencode): resolve Bedrock hang by using node build conditions (#…
alblez Jun 5, 2026
5c8eb0a
fix(workflows): retry nix-hashes compute-hash on transient failure (#…
jerome-benoit Jun 5, 2026
a8adfb6
fix(stats): scroll model charts to latest on mobile
adamdotdevin Jun 5, 2026
236cfcb
fix(opencode): prevent destructive edit matches (#30932)
nexxeln Jun 5, 2026
fff36b7
chore: generate
opencode-agent[bot] Jun 5, 2026
02a5ae6
fix(core): respect v2 default agents (#30969)
kitlangton Jun 5, 2026
e9aa33d
chore: generate
opencode-agent[bot] Jun 5, 2026
5d7157f
test(opencode): remove disposal event wait race (#30971)
rekram1-node Jun 5, 2026
f8cf8fa
test(opencode): remove shell timeout output race (#30974)
rekram1-node Jun 5, 2026
cc487dd
fix(opencode): gate reasoning summaries by provider (#30973)
rekram1-node Jun 5, 2026
3f64b5e
feat(core): admit v2 skill guidance (#30843)
kitlangton Jun 5, 2026
76a81ac
fix(workflows): serialize desktop release uploads (#30978)
rekram1-node Jun 5, 2026
9b09075
fix(stats): add mobile chart end spacing
adamdotdevin Jun 5, 2026
8ad44cd
chore: generate
opencode-agent[bot] Jun 5, 2026
41bd912
sync release versions for v1.16.2
Jun 5, 2026
12e3886
feat(core): interrupt v2 session execution (#30850)
kitlangton Jun 5, 2026
f26a9e8
chore: generate
opencode-agent[bot] Jun 5, 2026
d2204e0
feat(core): honor default session models (#30982)
kitlangton Jun 5, 2026
3151e22
fix(core): harden model selection edges (#30987)
kitlangton Jun 5, 2026
ecdfcd9
fix(tui): show current location in working copies; order by created; …
jlongster Jun 5, 2026
a7bd1cd
chore: generate
opencode-agent[bot] Jun 5, 2026
beae729
feat(core): compact v2 session context (#30986)
kitlangton Jun 5, 2026
3bbf8c8
fix(opencode): terminate help output with newline (#30992)
rekram1-node Jun 5, 2026
ca9bf7a
fix(opencode): honor Bedrock Mantle config (#31001)
rekram1-node Jun 5, 2026
0bdd9aa
fix(core): preserve model request semantics (#30990)
kitlangton Jun 5, 2026
760d523
chore: generate
opencode-agent[bot] Jun 5, 2026
a9094fd
feat(core): bound v2 tool output (#30999)
kitlangton Jun 5, 2026
7ebc7ff
chore: generate
opencode-agent[bot] Jun 5, 2026
05d1104
fix(core): scope Vertex provider transforms (#31004)
kitlangton Jun 5, 2026
a57fb32
feat(core): expose session model switching (#31011)
kitlangton Jun 5, 2026
c814f84
fix(tui): update tool spacing before layout
kitlangton Jun 5, 2026
820c984
fix(core): recover v2 context overflow (#31005)
kitlangton Jun 5, 2026
025e1ac
fix(core): validate public session model switches (#31012)
kitlangton Jun 5, 2026
f591bf5
feat(tui): delete working copies from move dialog (#31017)
jlongster Jun 5, 2026
969bb90
chore: generate
opencode-agent[bot] Jun 5, 2026
499a8a4
fix(tui): bootstrap new project copies (#31019)
jlongster Jun 5, 2026
a645615
fix(opencode): limit generated project copy names (#31022)
jlongster Jun 5, 2026
d5b2056
fix(tui): inject reminder after moving session (#31027)
jlongster Jun 5, 2026
015e79f
fix(session): respect directory filter with workspaces (#30804)
rexdotsh Jun 5, 2026
e3a55db
feat(app): improve servers UI (#30961)
arvsrn Jun 5, 2026
93a58f5
chore: generate
opencode-agent[bot] Jun 5, 2026
24347f3
feat(app): updates to project avatar (#30964)
arvsrn Jun 5, 2026
9ed17da
chore: generate
opencode-agent[bot] Jun 5, 2026
1fd9c77
feat(app): sessions list improvements (#30941)
arvsrn Jun 5, 2026
3e704d0
chore: generate
opencode-agent[bot] Jun 5, 2026
7c6adcf
fix(core): scope v2 prompt cache by session (#31036)
opencode-agent[bot] Jun 5, 2026
b36b859
fix(stats): filter market share to go
adamdotdevin Jun 5, 2026
f750dea
fix(app): increase project session limit and add scrolling (#31035)
Hona Jun 5, 2026
83dca45
fix(core): make V2 reads media-aware and binary-safe (#31038)
kitlangton Jun 5, 2026
fa2b63f
chore: update nix node_modules hashes
opencode-agent[bot] Jun 6, 2026
3f0ef9b
feat(opencode): add search to auth logout command (#31053)
rekram1-node Jun 6, 2026
ba57718
feat(opencode): support non-interactive MCP add (#31054)
rekram1-node Jun 6, 2026
54f4974
feat(http-recorder): prepare public beta release (#31018)
kitlangton Jun 6, 2026
ceccde7
refactor(core): simplify filesystem mutation protocol (#31059)
kitlangton Jun 6, 2026
147169e
refactor(core): simplify filesystem read protocol (#31058)
kitlangton Jun 6, 2026
4ac4df4
chore: update nix node_modules hashes
opencode-agent[bot] Jun 6, 2026
09d9cf0
refactor(core): simplify search root protocol (#31060)
kitlangton Jun 6, 2026
bd7eb06
feat: desktop v2 everything WSL (#23407)
Hona Jun 6, 2026
1399323
chore: generate
opencode-agent[bot] Jun 6, 2026
747b8da
fix(core): bound prompt cache session keys (#31062)
kitlangton Jun 6, 2026
4814ab3
fix(core): enforce V2 tool permissions (#31061)
kitlangton Jun 6, 2026
7d3d80f
feat(opencode): fff search tools (#27802)
dmtrKovalenko Jun 6, 2026
77963d8
chore: generate
opencode-agent[bot] Jun 6, 2026
4519a1d
chore: update nix node_modules hashes
opencode-agent[bot] Jun 6, 2026
b9131aa
fix: background agent prompting, lets kill this sleep behavior oml (#…
rekram1-node Jun 6, 2026
0875203
test: fix tool test (#31163)
rekram1-node Jun 6, 2026
06d7840
docs: fix MCP header interpolation example to {env:VAR} (#31078)
fancive Jun 6, 2026
effd27b
chore(http-recorder): disable release automation (#31160)
kitlangton Jun 7, 2026
660a00d
refactor(core): unify v2 tool architecture (#31168)
kitlangton Jun 7, 2026
807c804
fix(core): use static tool type imports (#31170)
kitlangton Jun 7, 2026
12acb9a
docs(v2): update permission rule naming (#31167)
kitlangton Jun 7, 2026
10d1e04
fix(core): isolate image normalization (#31165)
kitlangton Jun 7, 2026
48c26fa
fix(test): release Windows search handles (#31172)
kitlangton Jun 7, 2026
eb9a683
fix(core): harden unified tool runtime (#31171)
kitlangton Jun 7, 2026
1025540
test(core): cover managed output read permissions (#31166)
kitlangton Jun 7, 2026
53ff1b5
fix(core): preserve session failure causes
kitlangton Jun 7, 2026
fe0c4f8
refactor(server): canonicalize service API (#31049)
thdxr Jun 7, 2026
155e1f2
chore: generate
opencode-agent[bot] Jun 7, 2026
31c099b
chore: update nix node_modules hashes
opencode-agent[bot] Jun 7, 2026
f20655b
fix(tui): sort connect providers alphabetically (#30891)
robertDouglass Jun 7, 2026
9b4d5b0
feat(desktop): make updates persistent and responsive (#31191)
Hona Jun 7, 2026
7a2c49e
chore: generate
opencode-agent[bot] Jun 7, 2026
106f8e9
refactor(tui): extract standalone package (#31193)
thdxr Jun 7, 2026
21a644f
chore: generate
opencode-agent[bot] Jun 7, 2026
f240497
chore: update nix node_modules hashes
opencode-agent[bot] Jun 7, 2026
a29deb1
fix(app): refresh directory MCP status (#31194)
Hona Jun 7, 2026
2181472
feat(desktop): open attachments in active project (#31192)
Hona Jun 7, 2026
472b331
chore: generate
opencode-agent[bot] Jun 7, 2026
2006259
fix(desktop): style home session scrollbar (#31202)
Hona Jun 7, 2026
e82542b
fix(desktop): disable hidden agent cycling (#31207)
Hona Jun 7, 2026
233427f
test(core): cover skill directory output (#31263)
rekram1-node Jun 7, 2026
aacdb34
fix(opencode): avoid duplicate skill catalog (#31269)
rekram1-node Jun 7, 2026
8ff4013
chore(opencode): update MCP SDK to 1.29.0 (#31268)
rekram1-node Jun 7, 2026
c495635
chore: generate
opencode-agent[bot] Jun 7, 2026
914a643
chore: update nix node_modules hashes
opencode-agent[bot] Jun 7, 2026
07808be
run: make minimal mode more minimal (#31227)
simonklee Jun 7, 2026
3867fa2
chore: generate
opencode-agent[bot] Jun 7, 2026
b1d14ac
chore: update web and desktop code owners (#31289)
Hona Jun 8, 2026
65a3f7f
fix(desktop): few WSL bugs (#31095)
neriousy Jun 8, 2026
4d09a71
chore: generate
opencode-agent[bot] Jun 8, 2026
b5cb9aa
fix(opencode): respect MCP server capabilities (#31271)
rekram1-node Jun 8, 2026
4863aed
console: update email
fwang Jun 8, 2026
79ea379
zen: fix
fwang Jun 8, 2026
685a894
fix(opencode): include acp pending tool input (#31321)
nexxeln Jun 8, 2026
bea56fe
fix(lsp): resolve JDTLS root to topmost pom.xml in Java Maven multi-m…
areyouok Jun 8, 2026
d46af9c
chore: generate
opencode-agent[bot] Jun 8, 2026
0050134
fix(session): merge per-call tool rules into session permission (#30529)
remorses Jun 8, 2026
1772e8e
docs(go): update MiniMax M3 pricing (#31350)
MrMushrooooom Jun 8, 2026
b1a6c40
fix: speed up fff file search (#31366)
nexxeln Jun 8, 2026
89e371c
chore: generate
opencode-agent[bot] Jun 8, 2026
f116a55
fix(stats): show new for leaderboard deltas
adamdotdevin Jun 8, 2026
4119051
fix: stabilize fff file results (#31369)
nexxeln Jun 8, 2026
ea5f976
chore: generate
opencode-agent[bot] Jun 8, 2026
89e2a23
fix(core): restore npm proxy agent patch (#31373)
rekram1-node Jun 8, 2026
f3f59db
chore: update nix node_modules hashes
opencode-agent[bot] Jun 8, 2026
31d2fec
chore: upgrade OpenTUI to v0.3.4 (#31326)
simonklee Jun 8, 2026
9654412
chore: update nix node_modules hashes
opencode-agent[bot] Jun 8, 2026
b34d924
fix(core): disable fff trace logs (#31380)
nexxeln Jun 8, 2026
f43209b
fix(session): avoid sticky prompt tool overrides (#31394)
nexxeln Jun 8, 2026
0a7cb20
fix(opencode): await run event loop (#31389)
rekram1-node Jun 8, 2026
c06ad7c
refactor(core): replace legacy logger with Effect logging (#31310)
thdxr Jun 8, 2026
5376661
chore: generate
opencode-agent[bot] Jun 8, 2026
fc52c5a
fix(tui): trim select footer action highlight (#31411)
jlongster Jun 8, 2026
6e84142
fix(opencode): support MiniMax M3 thinking toggle (#31426)
rekram1-node Jun 8, 2026
a86ecf3
fix: adjust item id stripping to happen prior to request signing (#31…
rekram1-node Jun 8, 2026
161247c
fix(opencode): generate reasoning variants for all OpenRouter models.…
AnthonyMLau Jun 9, 2026
f565ff3
feat(app): add draft tab support to tabs store (#31343)
Brendonovich Jun 9, 2026
277ecc5
chore: generate
opencode-agent[bot] Jun 9, 2026
0efc334
fix(opencode): paginate MCP catalogs (#31442)
rekram1-node Jun 9, 2026
79cff28
fix(opencode): pass abort signal to MCP tool calls (#31455)
rekram1-node Jun 9, 2026
1a08ee7
feat(app): draft prompt state (#31452)
Brendonovich Jun 9, 2026
50c9d52
chore: generate
opencode-agent[bot] Jun 9, 2026
384a8f5
feat(app): tabs help button (#31454)
Brendonovich Jun 9, 2026
ab701d2
feat: add "reasoning" as interleaved field option for vLLM providers …
delta9000 Jun 9, 2026
5372c63
fix(app): clip rounded session panels (#31462)
Hona Jun 9, 2026
2ababc8
core: fix idle CPU use in file logger (#31478)
simonklee Jun 9, 2026
671d193
docs: add uninstall troubleshooting steps (#31424)
opencode-agent[bot] Jun 9, 2026
7c1e61a
leave a breadcrumb comment about batchWindow zero (#31508)
kommander Jun 9, 2026
b4a6419
chore: stats -> data
adamdotdevin Jun 9, 2026
960eace
test(core): avoid Windows worker close race (#31532)
rekram1-node Jun 9, 2026
3752218
refactor(tui): centralize application exit (#31524)
thdxr Jun 9, 2026
8415ff5
chore: generate
opencode-agent[bot] Jun 9, 2026
0bb677c
feat(opencode): configure Cohere North model (#31536)
rekram1-node Jun 9, 2026
6566ede
refactor(core): consolidate references (#31539)
thdxr Jun 9, 2026
ffcb45d
feat(tui): show project copy in session list (#31421)
jlongster Jun 9, 2026
ada5b31
chore: generate
opencode-agent[bot] Jun 9, 2026
f1c31f4
fix(stats): use data branding assets
adamdotdevin Jun 9, 2026
db9391e
drop citation_options from cohere (#31543)
rekram1-node Jun 9, 2026
531eebb
zen: add north mini code model
fwang Jun 9, 2026
d68397b
fix(data): timestamp formatting
adamdotdevin Jun 9, 2026
c4bc902
fix(opencode): support Claude Fable reasoning (#31546)
rekram1-node Jun 9, 2026
0777cf1
fix(mcp): log actionable connection statuses (#31544)
rekram1-node Jun 9, 2026
132ef57
refactor(core): simplify location filesystem (#31545)
thdxr Jun 9, 2026
cc52dc3
chore: generate
opencode-agent[bot] Jun 9, 2026
1daf535
chore: update nix node_modules hashes
opencode-agent[bot] Jun 9, 2026
600e405
fix(opencode): restore effect error logging (#31551)
thdxr Jun 9, 2026
7a54a2c
chore: generate
opencode-agent[bot] Jun 9, 2026
07e5ea9
feat(opencode): add typed application layer graph (#31531)
jlongster Jun 9, 2026
9b8e356
zen: add claude fable 5
fwang Jun 9, 2026
c939aa0
chore: generate
opencode-agent[bot] Jun 9, 2026
381eabb
refactor(mcp): simplify service helpers (#31549)
rekram1-node Jun 9, 2026
80c0b06
feat: add X-Session-Id header for proxy cache routing affinity (#31511)
songchaow Jun 9, 2026
bc42187
zen: update email
fwang Jun 9, 2026
1cc94bb
fix(desktop): update Electron stack and panel layout (#31571)
Hona Jun 9, 2026
215fb39
chore: generate
opencode-agent[bot] Jun 9, 2026
ce4e658
chore: update nix node_modules hashes
opencode-agent[bot] Jun 9, 2026
a0409e6
refactor(core): unify filesystem search service (#31566)
thdxr Jun 10, 2026
6ae6f0f
chore: generate
opencode-agent[bot] Jun 10, 2026
1d46b5c
chore: update nix node_modules hashes
opencode-agent[bot] Jun 10, 2026
c4aa049
fix(tui): let gutter replace current marker (#31586)
thdxr Jun 10, 2026
4597c68
fix(core): prefer shorter paths for tied search scores
thdxr Jun 10, 2026
be8fee5
chore: generate
opencode-agent[bot] Jun 10, 2026
7859182
fix(core): expose partial filesystem scan results
thdxr Jun 10, 2026
4ae468f
chore: generate
opencode-agent[bot] Jun 10, 2026
e9e2612
chore: Update fff to 0.9.4 (#31583)
dmtrKovalenko Jun 10, 2026
e9106ef
chore: update nix node_modules hashes
opencode-agent[bot] Jun 10, 2026
6c6ed68
sync release versions for v1.17.0
Jun 10, 2026
9e9a351
sync: upstream v1.17.0 (6c6ed68b5 on dev)
Alezander9 Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages/core/migration/**/snapshot.json linguist-generated
packages/core/src/database/migration.gen.ts linguist-generated
6 changes: 2 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# web + desktop packages
packages/app/ @adamdotdevin
packages/tauri/ @adamdotdevin
packages/desktop/src-tauri/ @brendonovich
packages/desktop/ @adamdotdevin
packages/app/ @Hona @Brendonovich
packages/desktop/ @Hona @Brendonovich
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ts-dist
.turbo
**/.serena
.serena/
**/.omo
.omo/
/result
refs
Session.vim
Expand Down
2 changes: 1 addition & 1 deletion .opencode/command/translate.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: translate English to other languages
model: opencode/claude-opus-4-7
model: opencode/claude-opus-4-8
---

run git diff and translate changed english doc and UI copy files to other international languages. Translate all languages in parallel to save time.
Expand Down
3 changes: 3 additions & 0 deletions .opencode/opencode.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"$schema": "https://opencode.ai/config.json",
"provider": {},
"permission": {},
"reference": {
"effect": "github.com/Effect-TS/effect-smol",
},
"mcp": {},
"tools": {
"github-triage": false,
Expand Down
19 changes: 19 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ obj.b
const { a, b } = obj
```

### Imports

- Never alias imports. Do not use `import { foo as bar } from "..."` or renamed imports like `resolve as pathResolve`.
- Never use star imports. Do not use `import * as Foo from "..."` or `import type * as Foo from "..."`.
- If a namespace-style value is needed, import the module's own exported namespace by name, for example `import { Project } from "@opencode-ai/core/project"`, then reference `Project.ID`.
- Prefer dynamic imports for heavy modules that are only needed in selected code paths, especially in startup-sensitive entrypoints. Destructure dynamic import bindings near the top of the narrowest scope that needs them so they read like normal imports. Avoid inline chains such as `await import("./module").then((mod) => mod.value())` or `(await import("./module")).value()`. Keep branch-specific imports inside the branch that needs them to preserve lazy loading.

### Variables

Prefer `const` over `let`. Use ternaries or early returns instead of reassignment.
Expand Down Expand Up @@ -205,3 +212,15 @@ ship (`@browser-use/browsercode-core`, `@browser-use/bcode-browser`,
`@opencode-ai/{shared,plugin,sdk}`). This avoids upstream packages we
don't build (e.g. `enterprise`, `web`, `console`). The pre-push hook
runs this filtered command.
=======
## V2 Session Core

- Keep durable prompt admission separate from model execution. `SessionV2.prompt(...)` admits one durable `session_input` row before scheduling advisory `SessionExecution.wake(sessionID)` unless `resume: false` requests admit-only behavior. The serialized runner promotes admitted inputs into visible user messages at safe boundaries.
- Reusing a Session ID adopts the existing Session. Reusing a prompt message ID reconciles an exact retry only when Session, prompt, and delivery mode match; conflicting reuse fails. Historical projected prompts lazily synthesize promoted inbox records during exact retry.
- Keep `SessionExecution` process-global and Session-ID based. Its local implementation owns the process-local Session coordinator and discovers placement through `SessionStore` plus `LocationServiceMap.get(session.location)` only when a drain starts; no layer should take a Session ID. V2 interruption targets the active process-local ownership chain for that Session; idle or missing interruption is a no-op.
- Keep `SessionRunner`, model resolution, tool registry, permissions, and filesystem Location-scoped. Omitted `Location.workspaceID` means implicit-local placement; explicit workspace identity remains reserved for future placement semantics.
- Preserve one explicit `llm.stream(request)` call per provider turn and reload projected history before durable continuation. Do not bridge through legacy `SessionPrompt.loop(...)` or delegate orchestration to an in-memory tool loop.
- Keep local Session drains process-local until clustering is implemented. `SessionRunCoordinator` joins explicit same-Session resumes, coalesces prompt wakeups, and allows different Sessions to run concurrently. Advisory wakes drain eligible durable inbox rows only; post-crash activity recovery requires a separate explicit design before it may retry provider work.
- Keep delivery vocabulary explicit. Prompts steer by default and coalesce into the active activity at the next safe provider-turn boundary. Explicit `queue` inputs open FIFO future activities one at a time after the active activity settles.
- Keep EventV2 replay owner claims separate from clustered Session execution ownership.
- Keep the System Context algebra, registry, and built-ins in `src/system-context`; keep Context Source producers with their observed domains, and keep Session History selection plus Context Epoch persistence Session-owned.
124 changes: 124 additions & 0 deletions CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# OpenCode Session Runtime

OpenCode sessions preserve durable conversational history while assembling the runtime context an agent needs to act correctly in its current environment.

## Language

**System Context**:
The structured collection of contextual facts presented to the model as initial instructions and chronological updates.
_Avoid_: System prompt

**Session History**:
The projected chronological conversation selected for a provider turn after applying the active compaction and **Context Epoch** cutoffs.
_Avoid_: Session Context

**Context Source**:
One independently observed typed value within the **System Context**, represented by a stable key, JSON codec, infallible loader, pure baseline/update renderers, and an optional removal renderer for dynamic sources.
_Avoid_: Prompt fragment

**System Context Registry**:
The Location-scoped registry of ordered, scoped producers that contribute to the current **System Context**.

**Mid-Conversation System Message**:
A durable chronological instruction that tells the model the newly effective state of a changed **Context Source**.
_Avoid_: System update, system notification, raw text diff

**Context Epoch**:
The span during which one effective agent's initially rendered **System Context** remains immutable, ending at compaction or another baseline-replacing transition.

**Baseline System Context**:
The full **System Context** rendered at the start of a **Context Epoch**.
_Avoid_: Live system prompt

**Context Snapshot**:
The overwriteable model-hidden JSON state used to compare each **Context Source** with the value last admitted to a provider turn.

**Unavailable Context**:
An expected temporary inability to observe a **Context Source** value; the runtime retains its prior effective state and emits no update, or omits it until first successfully loaded.

**Safe Provider-Turn Boundary**:
The point immediately before a provider call, after durable input promotion and any required tool settlement, where context changes may be admitted chronologically.

**Model Tool Output**:
The bounded projection of a Core-executed tool result persisted in Session history and replayed to the model. A tool may shape this projection semantically, but the Tool Registry enforces the final size limit.

**Managed Tool Output File**:
A temporary file created under OpenCode's shared tool-output directory to retain complete output that was too large for Session history.

**Model Request Options**:
Provider-semantic model settings selected from the Catalog and active Session variant before the LLM protocol adapter encodes them for a provider request.
_Avoid_: Request body, wire options

**Generation Controls**:
Provider-neutral sampling and output controls, partitioned from provider semantics and compatibility wire fields when model metadata enters the Catalog.

## Relationships

- A **System Context** is an opaque carrier composed from zero or more **Context Sources**.
- **Session History** contains projected conversational messages and admitted **Mid-Conversation System Messages**; the active **Baseline System Context** remains separate provider-request state.
- The **System Context Registry** uses stable-keyed scoped contributions to assemble the current **System Context**; contributor removal naturally removes its sources at the next **Safe Provider-Turn Boundary**.
- A changed **Context Source** may produce one **Mid-Conversation System Message** containing its newly effective state.
- A **Mid-Conversation System Message** persists the exact combined rendered text sent to the model.
- The current **Context Snapshot** advances atomically with the corresponding durable **Mid-Conversation System Message**.
- A **Context Snapshot** stores one codec-encoded JSON value and, for removable dynamic sources, a pre-rendered removal message per stable **Context Source** key.
- Changes from multiple **Context Sources** admitted at one safe boundary combine into one **Mid-Conversation System Message**.
- Context changes are sampled and admitted lazily at a **Safe Provider-Turn Boundary**, never pushed asynchronously when their source changes.
- At a **Safe Provider-Turn Boundary**, newly promoted user input or settled tool results precede any combined **Mid-Conversation System Message**.
- The first provider turn renders the latest complete **Baseline System Context** and initializes its **Context Snapshot** without emitting a redundant **Mid-Conversation System Message**; unavailable initial context blocks the turn instead of persisting an incomplete baseline.
- Initial **System Context** preparation precedes the first durable input promotion so an unavailable baseline leaves that input pending and retryable; ordinary reconciliation remains after promotion.
- Compaction starts a new **Context Epoch** with a freshly rendered **Baseline System Context** and **Context Snapshot**; prior **Mid-Conversation System Messages** remain durable audit history but leave projected model history.
- A newly registered core or plugin-defined **Context Source** absent from the current snapshot emits its baseline rendering once at the next **Safe Provider-Turn Boundary**.
- **Context Source** keys are stable and namespaced; duplicate keys fail composition. `SystemContext.combine(...)` preserves caller order; the **System Context Registry** evaluates producers concurrently and combines them in stable contribution-key order so rendered context remains deterministic.
- Each **Context Source** loader returns one coherent typed value. `SystemContext.make(...)` hides that value type so differently typed sources compose uniformly. Its codec compares and stores that value; its pure renderers produce model-visible baseline, update, and removal text only when needed.
- `SystemContext.initialize(...)` observes a composed **System Context** once and produces a fresh **Baseline System Context** with its **Context Snapshot**.
- `SystemContext.reconcile(...)` observes a composed **System Context** once and returns exactly one next action: unchanged, updated, replacement ready, or replacement blocked.
- `SystemContext.replace(...)` represents an explicit baseline-replacing transition such as compaction or model/provider switch; it either produces a fresh generation or reports that replacement is blocked by unavailable admitted context.
- Context Epoch preparation retries until stable after optimistic revision mismatches so concurrent replacement requests cannot terminate an otherwise valid safe-boundary run.
- **Unavailable Context** uses stale-while-revalidate semantics and is distinct from a successfully loaded absence, which may emit removal text.
- Ordinary **Context Source** loaders return values directly; loaders that intentionally use stale-while-revalidate may explicitly return **Unavailable Context**.
- Nested project instruction discovery after successful reads remains a follow-up; when implemented, discovered instructions must be admitted durably at the next **Safe Provider-Turn Boundary**.
- Location-scoped services naturally re-resolve effective context when a moved session next runs in its destination location.
- Moving a Session clears its active **Context Epoch**, so the destination must initialize a complete baseline before another prompt can promote.
- Context Epoch initialization is fenced against the authoritative Session Location, so an old-Location runner cannot recreate source context after a concurrent move.
- Instruction discovery, source identity, persistence, and file loading belong to the instruction service; the **System Context** abstraction only composes effectful producers and renders loaded values.
- The first instruction-service slice observes global and upward project `AGENTS.md` files as one ordered aggregate **Context Source** at each **Safe Provider-Turn Boundary**.
- Built-in and instruction context producers register through the **System Context Registry** with stable contribution keys. Plugin-defined context registration and hot-reload lifecycle remain a follow-up built on the same scoped registry seam.
- Selected-agent available-skill guidance is a **Context Source** composed with Location-wide registry sources immediately before Context Epoch admission. It lists only names and descriptions permitted for that agent; skill bodies and locations are exposed only through the permission-checked `skill` tool.
- Switching the selected agent requests **Context Epoch** replacement. A switch admitted after the current **Safe Provider-Turn Boundary** applies to the next provider turn while leaving the already-prepared baseline durable. Epoch creation is fenced against the authoritative effective agent, and retries re-observe the current agent.
- A cross-agent replacement must complete before another provider turn; unavailable admitted context blocks that replacement instead of exposing the previous agent's privileged baseline.
- Local tool authorization and pending permission requests retain the effective agent of the provider turn that issued the call; a later agent switch cannot change that call's policy.
- Context source changes never wake idle sessions; the next naturally scheduled **Safe Provider-Turn Boundary** loads and compares current values lazily.
- Once admitted, a **Mid-Conversation System Message** remains durable even if the following provider attempt fails and is replayed unchanged on retry.
- **Mid-Conversation System Messages** remain durable Session-message history; normal user-facing transcript surfaces may hide them.
- The date **Context Source** initially preserves host-local calendar-date behavior; a configured user timezone may replace that default later.
- A **Context Epoch** begins with one immutable **Baseline System Context**.
- A **Context Epoch** durably records the effective agent that owns its **Baseline System Context**.
- A **Baseline System Context** is stored durably and reused verbatim across process restarts within its **Context Epoch**.
- A **Baseline System Context** durably preserves the exact joined text used for the active provider-cache prefix.
- Compaction or a model/provider switch starts a new **Context Epoch** because the baseline can be replaced without preserving the prior provider cache.
- A model/provider switch always starts a new **Context Epoch** while preserving chronological conversation history.
- **Model Request Options** remain provider-semantic through Catalog resolution. The Session runner maps them into the LLM package's provider-option namespace; the selected protocol adapter alone owns provider wire encoding.
- **Generation Controls**, protocol-semantic **Model Request Options**, and compatibility request body fields are separate Catalog domains. A shared ingestion adapter partitions legacy and models.dev AI-SDK-shaped options before routing.
- A **Mid-Conversation System Message** lowers to the provider's native chronological instruction role when supported and to a wrapped chronological fallback otherwise.
- When the effective aggregate instruction set changes, its **Mid-Conversation System Message** includes the complete current ordered set and supersedes the prior aggregate value; when no ambient instructions remain, the message states that previously loaded instructions no longer apply.
- Ambient project instruction discovery honors `OPENCODE_DISABLE_PROJECT_CONFIG`; global instructions remain eligible.
- Oversized textual **Model Tool Output** retains a bounded preview in Session history while its complete text moves to managed tool-output storage. Arbitrary structured-result size is a separate concern.
- One tool settlement receives one aggregate textual limit, using the configured maximum lines or UTF-8 bytes, whichever is reached first. The limit is provider-independent; token pressure belongs to context assembly and compaction.
- Generic truncation preserves the beginning and end of textual output. Tools may apply a more meaningful strategy before the Tool Registry enforces the final limit.
- A truncated **Model Tool Output** identifies its complete text both in the bounded model-visible preview and as a typed managed output path. Managed output paths do not modify the tool's validated structured result.
- A **Managed Tool Output File** is temporary and may expire after its retention period. The bounded **Model Tool Output**, not the file, is the durable replayable record.
- Failure to retain a **Managed Tool Output File** does not change a successful tool operation into a failed one. The Session records an explicitly lossy bounded output without a path, while operators receive diagnostics for the storage failure.
- Once a tool operation succeeds, bounding its **Model Tool Output** and publishing its one durable settlement form an interruption-safe completion region. Raw oversized success is never published before a later correction.
- When a structured-only result would exceed the **Model Tool Output** limit, its validated structured value remains unchanged for Session consumers while model replay uses a bounded textual JSON preview and optional managed output path.
- Existing tool-managed output paths survive generic bounding. A fallback file retains exactly the complete projected text received by the Tool Registry and never claims to reconstruct output already discarded by tool-specific shaping.
- **Managed Tool Output Files** use globally unique names in one shared flat directory. Their absolute paths are readable and searchable by ordinary tools; other absolute paths remain outside Location-scoped filesystem authority.
- Provider-executed tool results remain provider-native transcript facts outside generic Tool Registry bounding. Their context control requires provider-aware pruning or compaction because some providers require exact structured round-trip payloads.

## Example dialogue

> **Dev:** "The date changed while the session was active. Should the **Mid-Conversation System Message** say what the old date was?"
> **Domain expert:** "No. Emit the newly effective date so the agent can act on the current **System Context**."

## Flagged ambiguities

- Legacy `experimental.chat.system.transform` can mutate the assembled baseline system prompt arbitrarily, but V2 plugins do not yet expose an equivalent hook. Decide separately whether to port it, replace dynamic uses with plugin-defined **Context Sources**, or narrow its semantics.
Loading
Loading