- Add content validation in injectHookMessage() to prevent empty hook content injection
- Add logging to claude-code-hooks and keyword-detector for better debugging
- Document timing issues in empty-message-sanitizer comments
- Update README with improved setup instructions
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Make google_auth enabled by default (true) while still allowing users to disable it by setting google_auth: false.
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
Add new hook that uses the `experimental.chat.messages.transform` hook to prevent 'non-empty content' API errors by injecting placeholder text into empty messages BEFORE they're sent to the API.
This is a preventive fix - unlike session-recovery which fixes errors after they occur, this hook prevents the error from happening by sanitizing messages before API transmission.
Files:
- src/hooks/empty-message-sanitizer/index.ts (new hook implementation)
- src/hooks/index.ts (export hook function)
- src/config/schema.ts (add hook to HookName type)
- src/index.ts (wire up hook to plugin)
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
- Added isFreeTier() helper to match 'free', 'free-tier', or any tier starting with 'free'
- Replaced all hardcoded 'FREE' comparisons with isFreeTier() calls
- Fixes issue where FREE tier users couldn't authenticate due to tier ID mismatch
- Added comprehensive debug logging for troubleshooting (ANTIGRAVITY_DEBUG=1)
- Verified: onboardUser API now correctly called for FREE tier users
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
Directly modify empty text parts in storage files before attempting
to inject new parts. This ensures that existing empty text parts are
replaced with placeholder text, fixing the issue where Anthropic API
returns 'messages.X: all messages must have non-empty content' error
even after recovery.
- Added replaceEmptyTextParts function to directly replace empty text parts
- Added findMessagesWithEmptyTextParts function to identify affected messages
- Modified recoverEmptyContentMessage to prioritize replacing existing empty parts
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Removed random project ID generation (doesn't work for FREE tier)
- Added onboardManagedProject() to call onboardUser API for server-assigned managed project ID
- Updated type definitions: AntigravityUserTier, AntigravityOnboardUserPayload
- FREE tier users now get proper project IDs from Google instead of PERMISSION_DENIED errors
- Reference: https://github.com/shekohex/opencode-google-antigravity-auth🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
OmO had a tendency to act without asking questions compared to Claude Code. Even in situations with implicit assumptions, it would rush into work like an unleashed puppy the moment a prompt came in. This commit enhances the Intent Gate prompt to prevent such behavior.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Add storage.ts: Functions to find and truncate largest tool results
- Add TruncateState and TRUNCATE_CONFIG for truncation tracking
- Implement truncate-first recovery: truncate largest output -> retry (10x) -> compact (2x) -> revert (3x)
- Move session error handling to immediate recovery instead of session.idle wait
- Add compactionInProgress tracking to prevent concurrent execution
This fixes GitHub issue #63: "prompt is too long" errors now trigger immediate recovery by truncating the largest tool outputs first before attempting compaction.
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
This fix adds CLIProxyAPI-compatible random project ID generation when loadCodeAssist API fails to return a project ID. This allows FREE tier users to use the API without RESOURCE_PROJECT_INVALID errors.
Changes:
1. Added generateRandomProjectId() function matching CLIProxyAPI implementation
2. Changed fallback from empty string "" to generateRandomProjectId()
3. Cache all results (not just when projectId exists)
4. Removed unused ANTIGRAVITY_DEFAULT_PROJECT_ID import
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
The previous Windows implementation used System.Windows.Forms.MessageBox
which displays a blocking modal dialog requiring user interaction.
This replaces it with the native Windows.UI.Notifications.ToastNotificationManager
API (Windows 10+) which shows a non-intrusive toast notification in the corner,
consistent with macOS and Linux behavior.
- Uses native Toast API (no external dependencies like BurntToast)
- Non-blocking: notification auto-dismisses
- Graceful degradation: silently fails on older Windows versions
- Fix escaping for each platform (PowerShell: '' for quotes, AppleScript: backslash)
Implement cross-platform process cleanup handlers for LSP servers.
Added registerProcessCleanup() method to LSPServerManager that:
- Kills all spawned LSP server processes on process.exit
- Handles SIGINT (Ctrl+C) - all platforms
- Handles SIGTERM (kill signal) - Unix/macOS/Linux
- Handles SIGBREAK (Ctrl+Break) - Windows specific
This prevents LSP servers from becoming orphan processes when opencode terminates unexpectedly.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Use os.tmpdir() instead of hardcoded /tmp for cross-platform temp files
- Use os.homedir() with USERPROFILE fallback for Windows home directory
- Disable forceZsh on Windows (zsh not available by default)
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Changed agent tools configuration from include pattern (listing allowed tools)
to exclude pattern (listing disabled tools only). This ensures MCP tools like
websearch_exa, context7, and grep_app are available to agents by default.
Affected agents: librarian, oracle, explore, multimodal-looker
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Remove call_omo_agent from blocked tools (only calls explore/librarian, safe)
- Keep task and background_task blocked to prevent recursion
- Add checkSessionTodos() to verify incomplete todos before marking tasks complete
- Update session.idle event handler to respect todo status
- Add polling check in task completion to wait for todo-continuation
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
- Create README.ja.md with complete Japanese documentation
- Update language selector in README.md to include Japanese link
- Update language selector in README.ko.md to include Japanese link
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Add pattern matching for 'content...is empty' format to detectErrorType function
in session-recovery hook. This fixes detection of Anthropic API errors like
'The content field in the Message object at messages.65 is empty'.
Previously only caught 'non-empty content' and 'must have non-empty content'
patterns, missing this actual API error format.
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Block capture-pane, save-buffer, show-buffer, pipe-pane and their
aliases in interactive_bash tool. Guide users to use bash tool instead
for terminal output capture operations.
- Add BLOCKED_TMUX_SUBCOMMANDS list in constants.ts
- Add input validation in tools.ts to reject blocked commands
- Update tool description with blocked commands documentation
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Add FallbackState interface to track message removal attempts
- Implement getLastMessagePair() to identify last user+assistant message pair
- Add executeRevertFallback() to remove message pairs when compaction fails
- Configure max 3 revert attempts with min 2 messages requirement
- Trigger fallback after 5 compaction retries exceed
- Reset retry counter on successful message removal for fresh compaction attempt
- Clean fallback state on session deletion
Resolves: When massive context (context bomb) is loaded, compaction fails and session becomes completely broken. Now falls back to emergency message removal after all retry attempts fail, allowing session recovery.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- librarian.ts: Add 'CRITICAL: DATE AWARENESS' section warning against 2024 searches
- librarian.ts: Update examples to use 2025 instead of 2024
- utils.ts: Add librarian agent to envContext receiver list alongside OmO
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Reorganized prompt into Phase 0/1/2 workflow for systematic request handling
- Introduced 4 request types (TYPE A/B/C/D) for proper classification
- Removed ASCII art diagrams to simplify documentation
- Reduced prompt from 330 to 232 lines while maintaining clarity
- Improved flow between context gathering and decision-making phases
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Add Language Rule (MANDATORY) section in OmO Delegation_Rules
- Clarify that subagent prompts must always be in English
- Update background-task tool documentation with English requirement
- Update call-omo-agent tool documentation with English language rule
- LLMs perform significantly better with English prompts
- Improves consistency and performance across all agent-to-subagent communication
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Restrict background_task tool access for all spawned subagents (oracle, explore, librarian, frontend-ui-ux-engineer, document-writer, multimodal-looker) to prevent potential infinite recursion and unintended background task creation.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Implement getTmuxPath() utility to detect tmux availability at plugin load time
- Add getCachedTmuxPath() for retrieving cached tmux path
- Add startBackgroundCheck() for asynchronous tmux detection
- Conditionally register interactive_bash tool only when tmux is available
- Silently skip registration without error messages if tmux not found
- Export utilities from tools/interactive-bash/index.ts
Tool now gracefully handles systems without tmux installed.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Add task: false to oracle agent's tools configuration to prevent the oracle agent from calling the task() tool, which could lead to recursive self-invocation.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- All subagents: disable background_task to prevent recursive spawning
- explore/librarian: additionally disable call_omo_agent
- Ensures task-invoked subagents use call_omo_agent instead of background_task
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Fixed bug where remindedSessions was only cleared on user messages. Now also
clears on assistant response, enabling the todo continuation reminder to be
re-triggered on the next idle period after the assistant provides a response.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Add a new tool for managing tmux sessions with automatic tracking and cleanup:
- interactive_bash tool: Accepts tmux commands via tmux_command parameter
- Session tracking hook: Tracks omo-* prefixed tmux sessions per OpenCode session
- System reminder: Appends active session list after create/delete operations
- Auto cleanup: Kills all tracked tmux sessions on OpenCode session deletion
- Output truncation: Registered in TRUNCATABLE_TOOLS for long capture-pane outputs
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Tool names in builtinTools are lowercase ('grep', 'glob') but truncator
hooks were checking for capitalized names ('Grep', 'Glob'), causing
truncation to never trigger and resulting in context window overflow.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Add user time and system context to OmO agent prompt to help the model
understand the temporal context of the conversation.
Injected context includes:
- Working directory
- Platform (darwin/linux/win32)
- Current date and time
- Timezone
- Locale
Closes#51🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Message hooks like todo-continuation-enforcer and background-notification
now preserve the agent mode from the previous message when sending follow-up
prompts. This ensures that continuation messages and task completion
notifications use the same agent that was active in the conversation.
- Export findNearestMessageWithFields and MESSAGE_STORAGE from hook-message-injector
- Add getMessageDir helper to locate session message directories
- Pass agent field to session.prompt in todo-continuation-enforcer
- Pass agent field to session.prompt in BackgroundManager.notifyParentSession
Closes#59🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)