Skip to content

feat(opencode): lightweight TUI (oclite) and subagent directory fix#51

Merged
randomm merged 8 commits intodevfrom
feature/oclite-and-fixes
Jan 26, 2026
Merged

feat(opencode): lightweight TUI (oclite) and subagent directory fix#51
randomm merged 8 commits intodevfrom
feature/oclite-and-fixes

Conversation

@randomm
Copy link
Owner

@randomm randomm commented Jan 26, 2026

Summary

Implements the lightweight TUI (oclite) for Claude and fixes subagent session directory handling.

Changes

oclite Implementation (#27)

  • New lightweight CLI interface with raw ANSI terminal support
  • Minimal UI components: spinner, session display, user input handling
  • Terminal abstraction layer with proper ANSI escape sequence handling
  • Build script for creating oclite binary

Subagent Directory Fix (#50)

  • Fix task.ts to properly inherit parent session directory in subagents
  • Ensures subagent tools have correct working directory context

Files Changed

Core Implementation:

  • packages/opencode/src/cli/lite/ - New lightweight TUI module
  • packages/opencode/script/build-lite.ts - Build configuration
  • packages/opencode/src/tool/task.ts - Session directory inheritance fix

Support Files:

  • packages/opencode/src/agent/agent.ts - Agent updates
  • packages/opencode/src/session/processor.ts - Processor updates
  • packages/opencode/src/session/tools.ts - Tool configuration
  • packages/opencode/src/project/project.ts - Project configuration
  • packages/opencode/src/global/index.ts - Global setup
  • packages/opencode/src/util/ - Utility functions
  • packages/opencode/package.json - Dependencies
  • Tests and configurations

Closes

- Fix critical bug: task completion events now route to parent session
  (changed session_id: session.id to session_id: ctx.sessionID in task.ts)
- Remove 'any' type annotations from catch blocks
- Replace e?.name checks with proper type guards for AbortError
- Convert Global paths to getters for test isolation
- Fix log directory initialization order
- Clean up Tauri dependencies from lock file
Bun.file().stat() throws "Directories cannot be read like files" when
called on a directory. The .git path is a directory in normal repos
(only a file in worktrees). Using Node.js fs.stat() works correctly
with both.

Also fixed stat.isFile to stat.isFile() (method call vs property).
@github-actions
Copy link

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@randomm randomm merged commit 6981429 into dev Jan 26, 2026
2 checks passed
@randomm randomm deleted the feature/oclite-and-fixes branch January 26, 2026 19:07
randomm added a commit that referenced this pull request Feb 3, 2026
)

* fix(opencode): fix task auto-notification and remove any types

- Fix critical bug: task completion events now route to parent session
  (changed session_id: session.id to session_id: ctx.sessionID in task.ts)
- Remove 'any' type annotations from catch blocks
- Replace e?.name checks with proper type guards for AbortError
- Convert Global paths to getters for test isolation
- Fix log directory initialization order
- Clean up Tauri dependencies from lock file

* fix(project): use fs.stat instead of Bun.file for directory detection

Bun.file().stat() throws "Directories cannot be read like files" when
called on a directory. The .git path is a directory in normal repos
(only a file in worktrees). Using Node.js fs.stat() works correctly
with both.

Also fixed stat.isFile to stat.isFile() (method call vs property).

* feat(opencode): add lightweight TUI (oclite) with raw ANSI terminal (#27)

* fix(tool): inherit parent session directory in subagents (#50)

* fix(provider): add comprehensive null checks in auth.ts (#52)

* feat(cli): add task icons with color coding (#21)

* feat(cli): add metrics formatting utilities (#20)

* fix(project): handle empty commits and worktree path resolution
randomm added a commit that referenced this pull request Feb 3, 2026
)

* fix(opencode): fix task auto-notification and remove any types

- Fix critical bug: task completion events now route to parent session
  (changed session_id: session.id to session_id: ctx.sessionID in task.ts)
- Remove 'any' type annotations from catch blocks
- Replace e?.name checks with proper type guards for AbortError
- Convert Global paths to getters for test isolation
- Fix log directory initialization order
- Clean up Tauri dependencies from lock file

* fix(project): use fs.stat instead of Bun.file for directory detection

Bun.file().stat() throws "Directories cannot be read like files" when
called on a directory. The .git path is a directory in normal repos
(only a file in worktrees). Using Node.js fs.stat() works correctly
with both.

Also fixed stat.isFile to stat.isFile() (method call vs property).

* feat(opencode): add lightweight TUI (oclite) with raw ANSI terminal (#27)

* fix(tool): inherit parent session directory in subagents (#50)

* fix(provider): add comprehensive null checks in auth.ts (#52)

* feat(cli): add task icons with color coding (#21)

* feat(cli): add metrics formatting utilities (#20)

* fix(project): handle empty commits and worktree path resolution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant