[Discussion] Current State of opencode: Issues, Optimizations, and Future Directions #7684

Open
opened 2026-02-16 18:07:56 -05:00 by yindo · 1 comment
Owner

Originally created by @JeffC0628 on GitHub (Jan 26, 2026).

Originally assigned to: @thdxr on GitHub.

Discussion on Current State

I'd like to start a discussion regarding the current issues, potential optimizations, and future development directions for opencode. Here are some preliminary thoughts based on the current state of the codebase:

1. Known Issues & Tech Debt

While browsing the code, I found some pending TODOs and areas for improvement:

  • Server Refactoring: packages/opencode/src/server/server.ts is currently quite large. I suggest breaking it down into smaller route files to fix type inference issues.
  • Filesystem Security: The path check in packages/opencode/src/file/index.ts is currently lexical only. There might be risks of symlink escape or Windows cross-drive bypass. We should consider introducing realpath normalization.
  • Tool Invocation Logic: It is suggested to centralize the "invoke tool" logic in packages/opencode/src/session/prompt.ts.
  • Permission Persistence: packages/opencode/src/permission/next.ts does not yet save the permission ruleset to disk.

2. Optimization Points

  • Task Tool Enhancement: How can we make the Task Tool accept more complex inputs?
  • Tree-sitter Nix: Once officially released, replace with the official WASM version (packages/opencode/parsers-config.ts).

3. Future Directions

What core features do you think opencode should focus on next?

  • Better multi-language support?
  • Stronger Agent autonomy?
  • Richer plugin ecosystem?

Feel free to add to this and discuss in the comments!

Originally created by @JeffC0628 on GitHub (Jan 26, 2026). Originally assigned to: @thdxr on GitHub. # Discussion on Current State I'd like to start a discussion regarding the current issues, potential optimizations, and future development directions for opencode. Here are some preliminary thoughts based on the current state of the codebase: ## 1. Known Issues & Tech Debt While browsing the code, I found some pending TODOs and areas for improvement: * **Server Refactoring**: `packages/opencode/src/server/server.ts` is currently quite large. I suggest breaking it down into smaller route files to fix type inference issues. * **Filesystem Security**: The path check in `packages/opencode/src/file/index.ts` is currently lexical only. There might be risks of symlink escape or Windows cross-drive bypass. We should consider introducing `realpath` normalization. * **Tool Invocation Logic**: It is suggested to centralize the "invoke tool" logic in `packages/opencode/src/session/prompt.ts`. * **Permission Persistence**: `packages/opencode/src/permission/next.ts` does not yet save the permission ruleset to disk. ## 2. Optimization Points * **Task Tool Enhancement**: How can we make the Task Tool accept more complex inputs? * **Tree-sitter Nix**: Once officially released, replace with the official WASM version (`packages/opencode/parsers-config.ts`). ## 3. Future Directions What core features do you think opencode should focus on next? * Better multi-language support? * Stronger Agent autonomy? * Richer plugin ecosystem? Feel free to add to this and discuss in the comments!
Author
Owner

@github-actions[bot] commented on GitHub (Jan 26, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #10761: [Discussion] opencode 现状探讨:问题、优化点与未来方向 (Chinese version - exact duplicate)
  • #10753: Persist 'always' permission approvals to disk (addresses permission persistence tech debt)
  • #9554: [BUG] 'Always allow' TUI approvals override restrictions for all agents (related to permission system)
  • #6020: Permission selection not respected (related to permission persistence)
  • #9927: Agent Permission not work as expected (permission system issues)
  • #9971: feat: OAuth Enhancements - Multi-Account, YOLO Mode, Auto-Relogin (related to permission persistence & agent autonomy)
  • #10063: Plugin OAuth auth methods silently ignored (related to plugin ecosystem future direction)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 26, 2026): This issue might be a duplicate of existing issues. Please check: - #10761: [Discussion] opencode 现状探讨:问题、优化点与未来方向 (Chinese version - exact duplicate) - #10753: Persist 'always' permission approvals to disk (addresses permission persistence tech debt) - #9554: [BUG] 'Always allow' TUI approvals override restrictions for all agents (related to permission system) - #6020: Permission selection not respected (related to permission persistence) - #9927: Agent Permission not work as expected (permission system issues) - #9971: feat: OAuth Enhancements - Multi-Account, YOLO Mode, Auto-Relogin (related to permission persistence & agent autonomy) - #10063: Plugin OAuth auth methods silently ignored (related to plugin ecosystem future direction) Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7684