All notable changes to this project will be documented in this file.
/diffCommand: View git diffs directly from Discord — ideal for reviewing AI-made changes on mobile.targetoption:unstaged(default),staged, orbranchstatoption: show--statsummary only instead of full diffbaseoption: specify base branch fortarget:branchdiffs (default:main)- Inside a worktree thread → diffs the worktree path for that branch
- In a regular channel → diffs the channel-bound project path
- Output formatted in a
diffcode block; automatically truncated at Discord's 2000-char limit
- Access Control (Allowlist): Restrict bot usage to specific Discord users via a user ID allowlist.
- Setup wizard (Step 5): Optionally set a bot owner during initial setup.
- CLI commands:
remote-opencode allow add <userId>,remove <userId>,list, andresetfor managing the allowlist from the terminal. - Discord
/allowcommand: Authorized users can manage the allowlist directly from Discord (/allow add,/allow remove,/allow list) — only available when at least one user is already on the allowlist. - Auth guards: All Discord interactions (slash commands, buttons, passthrough messages) are checked against the allowlist.
- Unauthorized users receive an ephemeral "not authorized" message; passthrough messages are silently ignored.
- Empty allowlist = unrestricted mode (backward compatible — all server members can use the bot).
- Cannot remove the last allowed user via Discord (prevents lockout).
- Initial allowlist setup must be done via the CLI (
remote-opencode allow add) or the setup wizard (remote-opencode setup). The Discord/allowcommand is intentionally disabled when the allowlist is empty to prevent unauthorized users from bootstrapping access. - Config directory (
~/.remote-opencode/) is created with0700permissions (owner-only access). - Config file (
config.json) is written with0600permissions (owner read/write only). - CLI
allow addvalidates Discord snowflake format (17-20 digits).
- Context Header: All execution messages now display the current branch name and AI model at the top (e.g.
🌿 feature/dark-mode · 🤖 claude-sonnet-4-20250514). getCurrentBranch()utility inworktreeManagerto resolve the active git branch viagit rev-parse --abbrev-ref HEAD.buildContextHeader()formatter inmessageFormatterfor consistent header rendering.
- Replaced inline
(Model: ...)suffix with a dedicated context header line across all 7 message states (Starting, Waiting, Sending, Running, Done, Error-SSE, Error-catch).
- Automated Message Queuing: Added a new system to queue multiple prompts in a thread. If the bot is busy, new messages are automatically queued and processed sequentially.
- Fresh Context Mode: Each queued job can optionally start with a fresh AI conversation context (new session) while maintaining the same code state.
- Queue Management: New
/queueslash command suite to list, clear, pause, resume, and configure queue settings. - Queue Settings:
continue_on_failure: Toggle whether the queue stops or continues when a job encounters an error.fresh_context: Toggle between persistent conversation memory and fresh starts per job.
- Visual Feedback: The bot now reacts with
📥when a message is successfully queued via chat.
- Refactored Execution Logic: Moved core prompt execution to a dedicated
executionServicefor better reliability and code reuse. - Hardened Server Binding: Reverted
opencode serveto use default127.0.0.1binding (previously0.0.0.0) and updated port availability checks to match, preventing local network exposure.
- Model confirmation in Discord messages: The bot now displays which model is being used when starting a session.
- Real-time logging: Added always-on logging for
opencode servestartup commands, working directories, and process output (stdout/stderr) for easier debugging.
- Fixed
opencode servestartup failures: The bot now correctly detects when the server fails to start immediately and reports the actual error message to Discord instead of timing out after 30 seconds. - Resolved
--modelflag error: Moved model selection from theopencode servecommand (where it was unsupported) to the prompt API. - Fixed Model API format: Correctly formatted model identifiers as objects (
{ providerID, modelID }) as required by the OpenCode API. - Improved Port Management: Fixed port availability checks to bind to
0.0.0.0(matching the server) and added checks for orphaned servers to prevent "Address already in use" errors. - Fixed button handlers (Interrupt, Create PR) to correctly respect channel model preferences.
- Fixed instance key logic to include the model, allowing multiple models to be used for the same project in different channels.
- New
/setportsslash command to configure the port range for OpenCode server instances.
- Fixed Windows-specific spawning issue where the bot failed to find the
opencodecommand (now targetingopencode.cmd). - Resolved
spawn EINVALerrors on Windows by correctly configuring shell execution. - Fixed a crash where the bot would attempt to pass an unsupported
--modelflag toopencode serve. - Improved server reliability by extending the ready-check timeout to 30 seconds.
- Suppressed
DEP0190security warnings in the terminal caused by Windows-specific shell execution requirements. - Standardized internal communication to use
127.0.0.1and added real-time process logging (available viaDEBUGenv var).
- New
/modelslash command to list and set AI models per channel. - Support for
--modelflag in OpenCode server instances. - Persistent storage for channel-specific model preferences.
- Fixed a connection timeout issue where the bot failed to connect to the internal
opencode serveprocess. - Added
--hostname 0.0.0.0to theopencode servecommand to ensure the service is reachable. - Standardized internal communication to use
127.0.0.1instead oflocalhostto avoid IPv6 resolution conflicts on some systems. - Improved process exit handling in
serveManagerto ensure cleaner state management. - Fixed
DiscordAPIError[40060](Interaction already acknowledged) by adding safety checks and better error handling ininteractionHandler.ts. - Resolved a
TypeErrorinopencode.tsby adding safety checks for stream message updates. - Updated all interaction responses to use
MessageFlags.Ephemeralinstead of the deprecatedephemeralproperty to resolve terminal warnings.