Skip to content

feat(aliases): add oclog for live opencode log tailing#41

Merged
mlorentedev merged 1 commit into
mainfrom
feat/oclog-alias
May 18, 2026
Merged

feat(aliases): add oclog for live opencode log tailing#41
mlorentedev merged 1 commit into
mainfrom
feat/oclog-alias

Conversation

@mlorentedev
Copy link
Copy Markdown
Owner

Summary

Surfaced during AI-011-validation (2026-05-17). The opencode TUI shows "thinking..." for tens of seconds with no indication whether the model is streaming, hung mid-tool-call, or waiting on a congested upstream provider. The fastest way to know is to tail the newest log file in a parallel Ghostty split/tab.

Adds the alias to .zsh/aliases.zsh next to oc so it deploys via setup-linux.sh on every shell.

alias oclog='tail -F "$(ls -t ~/.local/share/opencode/log/*.log | head -1)" \
    | grep --line-buffered -vE "file\.watcher\.updated|bus type=message\.part\.delta"'

The filter strips two very chatty event types so signal/noise stays workable:

  • file.watcher.updated — inotify events, dozens per second on any active repo
  • bus type=message.part.delta — per-token publish events during streaming

Useful signals you DO see after filtering: service=llm ... stream (request sent), service=tool.registry started/completed (tool execution), ERROR lines, snapshot timings.

Workflow

Open Ghostty, Ctrl+Shift+E to split, in one pane oc, in the other oclog. Documented under "Live log tailing" in the runbook 40-runbooks/guide-opencode-go-setup.md.

Test plan

Cross-links

Surfaced during AI-011-validation (2026-05-17): the opencode TUI shows
"thinking..." for tens of seconds without indication of whether the model
is streaming, hung, or waiting on a tool call. The fastest way to know is
to tail the most recent log file in a parallel Ghostty split/tab.

Adds the alias to `.zsh/aliases.zsh` next to `oc` so it deploys via
setup-linux.sh on every shell:

    alias oclog='tail -F "$(ls -t ~/.local/share/opencode/log/*.log | head -1)" \
        | grep --line-buffered -vE "file\.watcher\.updated|bus type=message\.part\.delta"'

The filter strips two extremely chatty event types so the signal/noise
stays workable:
- file.watcher.updated -- inotify events, dozens per second in active repos
- bus type=message.part.delta -- per-token publish events during streams

Useful signals you DO see after filtering: service=llm ... stream (request
sent), service=tool.registry started/completed (tool execution), ERROR
lines, snapshot timings. Runbook 40-runbooks/guide-opencode-go-setup.md
already documents the pattern under "Live log tailing"; this PR is the
package-and-deploy side of that workflow.

Test: tests/aliases.bats line ~37, asserts the alias is present and
points at the right log path. 24/24 bats green locally.
@mlorentedev mlorentedev merged commit 0afb05d into main May 18, 2026
5 checks passed
@mlorentedev mlorentedev deleted the feat/oclog-alias branch May 18, 2026 04:01
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.

1 participant