Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
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
3d0bad9
Merge remote-tracking branch 'upstream/dev' into chore/upstream-sync-…
aiand-atul Jun 8, 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
  •  
  •  
  •  
20 changes: 15 additions & 5 deletions .github/workflows/nix-hashes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,24 @@ jobs:
BUILD_LOG=$(mktemp)
trap 'rm -f "$BUILD_LOG"' EXIT

# Build with fakeHash to trigger hash mismatch and reveal correct hash
nix build ".#packages.${SYSTEM}.node_modules_updater" --no-link 2>&1 | tee "$BUILD_LOG" || true
HASH=""
MAX_ATTEMPTS=3
for ((ATTEMPT = 1; ATTEMPT <= MAX_ATTEMPTS; ATTEMPT++)); do
# Build with fakeHash to trigger hash mismatch and reveal correct hash
nix build ".#packages.${SYSTEM}.node_modules_updater" --no-link 2>&1 | tee "$BUILD_LOG" || true

# Extract hash from build log with portability
HASH="$(nix run --inputs-from . nixpkgs#gnugrep -- -oP 'got:\s*\Ksha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)"
HASH="$(nix run --inputs-from . nixpkgs#gnugrep -- -oP 'got:\s*\Ksha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)"

[ -n "$HASH" ] && break

if [ "$ATTEMPT" -lt "$MAX_ATTEMPTS" ]; then
echo "::warning::Attempt ${ATTEMPT}/${MAX_ATTEMPTS} produced no hash for ${SYSTEM}; retrying in $((ATTEMPT * 10))s"
sleep $((ATTEMPT * 10))
fi
done

if [ -z "$HASH" ]; then
echo "::error::Failed to compute hash for ${SYSTEM}"
echo "::error::Failed to compute hash for ${SYSTEM} after ${MAX_ATTEMPTS} attempts"
cat "$BUILD_LOG"
exit 1
fi
Expand Down
29 changes: 23 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ jobs:
VITE_SENTRY_ENVIRONMENT: ${{ (github.ref_name == 'beta' && 'beta') || 'production' }}
VITE_SENTRY_RELEASE: desktop@${{ needs.version.outputs.version }}

- name: Package and publish
- name: Package
if: needs.version.outputs.release
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish always --config electron-builder.config.ts
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish never --config electron-builder.config.ts
working-directory: packages/desktop
timeout-minutes: 60
env:
Expand All @@ -356,11 +356,9 @@ jobs:
env:
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}

- name: Create and upload macOS .app.tar.gz
- name: Create macOS .app.tar.gz
if: runner.os == 'macOS' && needs.version.outputs.release
working-directory: packages/desktop/dist
env:
GH_TOKEN: ${{ steps.committer.outputs.token }}
run: |
if [[ "${{ matrix.settings.target }}" == "x86_64-apple-darwin" ]]; then
APP_DIR="mac"
Expand All @@ -378,7 +376,6 @@ jobs:
exit 1
fi
tar -czf "$OUT_NAME" -C "$(dirname "$APP_PATH")" "$(basename "$APP_PATH")"
gh release upload "v${{ needs.version.outputs.version }}" "$OUT_NAME" --clobber --repo "${{ needs.version.outputs.repo }}"

- name: Verify signed Windows Electron artifacts
if: runner.os == 'Windows'
Expand Down Expand Up @@ -464,6 +461,13 @@ jobs:
pattern: latest-yml-*
path: /tmp/latest-yml

- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
if: needs.version.outputs.release
with:
pattern: opencode-desktop-*
path: /tmp/desktop
merge-multiple: true

- name: Setup git committer
id: committer
uses: ./.github/actions/setup-git-committer
Expand All @@ -490,6 +494,19 @@ jobs:
git config --global user.name "opencode"
ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true

- name: Upload desktop release assets
if: needs.version.outputs.release
env:
GH_TOKEN: ${{ steps.committer.outputs.token }}
run: |
shopt -s nullglob
files=(/tmp/desktop/*.{exe,blockmap,dmg,zip,AppImage,deb,rpm} /tmp/desktop/*.app.tar.gz)
if (( ${#files[@]} == 0 )); then
echo "No desktop release assets found"
exit 1
fi
gh release upload "v${{ needs.version.outputs.version }}" "${files[@]}" --clobber --repo "${{ needs.version.outputs.repo }}"

- run: ./script/publish.ts
env:
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ const table = sqliteTable("session", {

- 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. It discovers placement through the read-side `SessionStore` and `LocationServiceMap.get(session.location)`; no layer should take a Session ID.
- 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.
38 changes: 37 additions & 1 deletion CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ OpenCode sessions preserve durable conversational history while assembling the r
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
Expand All @@ -20,7 +24,7 @@ A durable chronological instruction that tells the model the newly effective sta
_Avoid_: System update, system notification, raw text diff

**Context Epoch**:
The span during which one initially rendered **System Context** remains immutable, ending at compaction or another baseline-replacing transition.
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**.
Expand All @@ -35,9 +39,23 @@ An expected temporary inability to observe a **Context Source** value; the runti
**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.
Expand Down Expand Up @@ -65,18 +83,36 @@ The point immediately before a provider call, after durable input promotion and
- 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

Expand Down
Loading
Loading