GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): keep a daemon command's output file on disk at the shell output cap by dezren39 · Pull Request #2685 · developing-today-forks/opencode

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026

Copy link
Copy Markdown

Closes the daemon-side gap of #2486 left by the 2026-11-22 sync (#2677). The prebuilt process daemon writes a command's whole output file, so the server now cuts a running daemon command's file back to MAX_OUTPUT_BYTES (checked every second and at exit) and records it in the command's daemon metadata (capped) so a restarted server still reports truncation. Reads, pages and results stop at the cap, matching the in-process spawner. A file can outgrow the cap by what the command writes within one second before it is cut back.

Behavior change from upstream: a daemon command's result tail now comes from the capped capture (first 10 MiB), the fork's #2486 rule, not from the end of an unbounded file; the 17 MiB case in shell-daemon.test.ts is updated accordingly.

Validated (macOS): core bun typecheck and typecheck:tsc; lint:effect-patterns; shell tests 389 pass; new test "keeps a daemon command's output file on disk at the cap" fails with the watch disabled; full core suite 10054 pass, 4 fail — Watcher node fallback (macOS fs.watch), and boot-work / Project.resolve / Session.create git-spawn counts, which fail the same way on unmodified main on this machine right now (they passed an hour earlier on identical code), so environmental. Not validated: Linux/Windows, the real @opencode/pty daemon under load.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
fix(core): keep a daemon command's output file on disk at the shell o…
af25875
…utput cap

#2486 bounded a shell command's capture at MAX_OUTPUT_BYTES so a runaway
command cannot fill the disk. Since the upstream sync local commands run
in the process daemon, a prebuilt binary that writes the whole output
file, so only reads were capped (#2677). The server now checks each
running daemon command's file every second and at its exit, cuts it
back to the cap, and records that in the command's daemon metadata so a
restarted server still reports the capture as truncated. Reads stop at
the cap, so what the daemon writes after a cut (appended again, or past
a hole) is never shown. A result now reads the tail of the capped
capture, as for the in-process spawner.

Tests (shell-daemon.test.ts): "keeps a daemon command's output file on
disk at the cap" (fails with the watch disabled); the 17 MiB case of
"bounds what it reads..." now expects the capped capture.
@dezren39
dezren39 merged commit f89bf00 into main Nov 22, 2026
@dezren39
dezren39 deleted the daemon-output-cap branch November 22, 2026 17:40
@dezren39 dezren39 mentioned this pull request Nov 22, 2026
Follow-ups from the 2026-11-22 upstream sync #2677
Open
2 tasks
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.