Commit Graph

239 Commits

Author SHA1 Message Date
YeonGyu-Kim
a3ff28b250 feat(preemptive-compaction): add onBeforeSummarize callback and context injection
- Added BeforeSummarizeCallback type to allow injecting context before session summarization
- Added onBeforeSummarize option to PreemptiveCompactionOptions
- Created compaction-context-injector module that injects summarization instructions with sections:
  - User Requests (As-Is)
  - Final Goal
  - Work Completed
  - Remaining Tasks
  - MUST NOT Do (Critical Constraints)
- Wired up callback invocation in preemptive-compaction before calling summarize API
- Exported new hook from src/hooks/index.ts

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-20 15:39:54 +09:00
YeonGyu-Kim
8406f3d6d7 fix(anthropic-auto-compact): handle empty messages at arbitrary indices
- Add messageIndex field to ParsedTokenLimitError type for tracking message position
- Extract message index from 'messages.N' format in error messages using regex
- Update fixEmptyMessages to accept optional messageIndex parameter
- Target specific empty message by index instead of fixing all empty messages
- Apply replaceEmptyTextParts before injectTextPart for better coverage
- Remove experimental flag requirement - non-empty content errors now auto-recover by default
- Fixes issue where compaction could create empty messages at positions other than the last message

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-20 14:47:42 +09:00
YeonGyu-Kim
917979495a fix(preemptive-compaction): increase token threshold from 0.80 to 0.85
Raise the preemptive compaction trigger point from 80% to 85% to reduce false-positive compactions and allow longer session contexts before automatic compaction kicks in.

🤖 Generated with assistance of OhMyOpenCode
2025-12-20 13:35:22 +09:00
YeonGyu-Kim
3c039cba49 feat(preemptive-compaction): implement automatic session compaction at token threshold
Monitor token usage after assistant responses and automatically trigger session
compaction when exceeding configured threshold (default 80%). Toast notifications
provide user feedback on compaction status.

Controlled via experimental.preemptive_compaction config option.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-20 13:31:30 +09:00
YeonGyu-Kim
f5ce55e06f fix(todo-continuation-enforcer): show reminder only once per session with 2s countdown
- Reduce COUNTDOWN_SECONDS from 5 to 2 for faster reminder display
- Remove logic that clears remindedSessions on assistant response to prevent re-triggering
- Ensures todo continuation reminder displays exactly once per session

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-20 12:00:06 +09:00
YeonGyu-Kim
8b8f21e794 refactor(keyword-detector): consolidate completion enforcement from prove-yourself into ultrawork mode
- Remove dedicated prove-yourself mode (frustration keyword detector)
- Add ZERO TOLERANCE FAILURES section to ultrawork mode
- Consolidate completion enforcement rules: no scope reduction, no partial completion, no assumed shortcuts, no premature stopping
- Simplify constants by removing separate frustration handler

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-20 11:37:31 +09:00
Andrew Joslin
f2f73d17f7 fix: skip keyword injection on first message for correct session titles (#125) 2025-12-20 11:36:14 +09:00
YeonGyu-Kim
12cd3382aa fix(anthropic-auto-compact): improve session recovery with Continue prompt
- Replace recursive retry mechanism with explicit session.prompt_async('Continue')
- Clear all compaction state after successful revert to prevent state corruption
- Prevents infinite retry loops and improves session reliability

🤖 Generated with assistance of oh-my-opencode
2025-12-19 19:37:36 +09:00
YeonGyu-Kim
2025f7e884 fix(todo-continuation-enforcer): only show countdown when incomplete todos exist in main session
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

Changes:
- Add main session check: skip toast for subagent sessions
- Move todo validation BEFORE countdown: only start countdown when incomplete todos actually exist
- Improve toast message to show remaining task count

This fixes the issue where countdown toast was showing on every idle event, even when no todos existed or in subagent sessions.
2025-12-19 19:06:35 +09:00
YeonGyu-Kim
15d36ab461 feat(todo-continuation-enforcer): implement countdown toast notification
Implement countdown toast feature showing visual feedback before todo continuation:
- Changed from 5-second timeout to interval-based countdown
- Shows toast every second: "Resuming in 5s...", "Resuming in 4s...", etc.
- Toast duration set to 900ms to prevent overlap
- Countdown cancels on user message, session error, or session deletion

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 16:43:04 +09:00
YeonGyu-Kim
eccbfa5550 feat(keyword-detector): add prove-yourself mode for frustration keywords
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 16:42:56 +09:00
YeonGyu-Kim
4da4302105 fix(non-interactive-env): add editor and pager environment variables to block interactive UI
- GIT_EDITOR, EDITOR, VISUAL, GIT_SEQUENCE_EDITOR set to 'true' to block editor invocations during git operations like rebase
- GIT_PAGER, PAGER set to 'cat' to disable pagination
- Fixes issue where git rebase --continue was still opening nvim despite existing non-interactive env vars

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 15:15:10 +09:00
YeonGyu-Kim
f5e65b8c5c feat(auto-update-checker): add local development mode toast notification
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 15:02:29 +09:00
YeonGyu-Kim
a47571722a Merge commit 'e261853451addb9d3d5d5d0fb7aae830ab492470' 2025-12-19 14:06:43 +09:00
YeonGyu-Kim
e261853451 feat(auto-update-checker): implement background auto-update with configurable pinning
- Run update check in background after startup (non-blocking)
- Auto-update pinned versions in config file when newer version available
- Add auto_update config option to disable auto-updating
- Properly invalidate package cache after config update
- Scoped regex replacement to avoid editing outside plugin array

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 14:05:09 +09:00
YeonGyu-Kim
85a3111253 refactor(keyword-detector): relax analyze-mode recommendations for practical agent usage
Reduce analyze-mode agent recommendations from aggressive (10+ agents, 3+ explore, 3+ librarian, 2+ general, 3+ oracle) to moderate (1-2 explore, 1-2 librarian, oracle only if complex) for simple requests like "살펴봐줘". Previous settings caused unnecessary agent spawning and token consumption for straightforward analysis tasks. New recommendation prioritizes context gathering with direct tools (Grep, AST-grep) for typical workflows, reserving oracle consultation for genuinely complex scenarios (architecture, multi-system, debugging after failures).

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 13:38:54 +09:00
YeonGyu-Kim
8440dce902 fix(hooks): restore grep truncation by removing unused grep-output-truncator (#120)
The grep-output-truncator hook was never registered in index.ts, so grep
output was not being truncated since commit 03a4501 which removed grep/Grep
from tool-output-truncator's TRUNCATABLE_TOOLS list.

- Remove unused grep-output-truncator.ts
- Add "grep" and "Grep" back to tool-output-truncator's TRUNCATABLE_TOOLS

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-19 12:08:38 +09:00
YeonGyu-Kim
c37d41edb2 fix(auto-update-checker): add bun.lock handling to invalidatePackage()
- Removes package from node_modules, package.json dependencies, AND bun.lock (workspaces.dependencies + packages)
- Fixes issue where 'update available' notification appeared but actual update didn't happen on restart due to bun.lock pinning old version
- Added BunLockfile interface and stripTrailingCommas helper for JSON parsing

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 04:44:01 +09:00
YeonGyu-Kim
df87f5f113 Introducing our main agent: Sisyphus (#113)
* docs: rename OmO agent to Sisyphus, OmO-Plan to Planner-Sisyphus

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* refactor: rename OmO agent to Sisyphus with automatic config migration

- Rename OmO agent to Sisyphus (uses mythological pushing-the-boulder concept)
- Rename OmO-Plan to Planner-Sisyphus for consistency
- Update config schema: omo_agent → sisyphus_agent
- Add backward compatibility: automatically migrate user's oh-my-opencode.json files
- Migration handles old keys (OmO, omo, OmO-Plan, omo-plan) and rewrites config when detected
- Update agent name mappings, index files, and type definitions
- Add Sisyphus PNG asset to brand identity

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* docs: add Sisyphus mythology introduction and teammates concept to all READMEs

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(startup-toast): show Sisyphus steering message when enabled

- Updated startup toast to show "Sisyphus on steroids is steering OpenCode" when Sisyphus agent is enabled
- Refactored getToastMessage function to handle conditional message rendering
- Pass isSisyphusEnabled flag from plugin configuration to auto-update-checker hook

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* docs(sisyphus): add philosophical context to Sisyphus agent identity

- Add "Why Sisyphus?" explanation connecting the daily work cycle of humans and AI agents
- Emphasize code quality expectations: indistinguishable from senior engineer's work
- Concise identity statement: work, delegate, verify, ship without AI slop

This clarifies the agent's purpose and reinforces the principle that quality code should not reveal whether it was written by human or AI.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 04:11:20 +09:00
YeonGyu-Kim
4cd2745069 refactor(auto-update-checker): remove config path from startup toast
Remove the config file path from the startup toast message. The toast now
only displays 'OpenCode is now on Steroids. oMoMoMoMo...' for a cleaner
user experience. Also removed the unused getUserConfigPath import.

🤖 Generated with assistance of OhMyOpenCode
2025-12-19 02:51:14 +09:00
YeonGyu-Kim
8cf713e149 feat(config): add experimental config for gating unstable features (#110)
* feat(anthropic-auto-compact): add aggressive truncation and empty message recovery

Add truncateUntilTargetTokens method, empty content recovery mechanism, and
emptyContentAttemptBySession tracking for robust message handling.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(session-recovery): add auto-resume and recovery callbacks

Implement ResumeConfig, resumeSession() method, and callback support for
enhanced session recovery and resume functionality.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(config): add experimental config schema for gating unstable features

This adds a new 'experimental' config field to the OhMyOpenCode schema that enables fine-grained control over unstable/experimental features:

- aggressive_truncation: Enables aggressive token truncation in anthropic-auto-compact hook for more aggressive token limit handling
- empty_message_recovery: Enables empty message recovery mechanism in anthropic-auto-compact hook for fixing truncation-induced empty message errors
- auto_resume: Enables automatic session resume after recovery in session-recovery hook for seamless recovery experience

The experimental config is optional and all experimental features are disabled by default, ensuring backward compatibility while allowing early adopters to opt-in to cutting-edge features.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 02:45:59 +09:00
YeonGyu-Kim
dad534e7c0 fix: break circular dependency in config error utilities to prevent plugin loader crash
- Created src/shared/config-errors.ts to isolate config error state management
- Removed function re-exports (getConfigLoadErrors, clearConfigLoadErrors) from main index.ts
- Only ConfigLoadError type is re-exported from main module to avoid OpenCode calling it as a plugin
- Updated auto-update-checker hook to import from shared/config-errors instead of main index
- Fixes "TypeError: undefined is not an object" crash when OpenCode iterated through ALL exports and called clearConfigLoadErrors(input) which returned undefined

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 02:20:46 +09:00
YeonGyu-Kim
63fea77572 fix: add Windows config path documentation and config error warnings (#97) (#109)
- Document platform-specific config paths in README (en/ko/ja)
  - Windows: %APPDATA%\opencode\oh-my-opencode.json
  - macOS/Linux: ~/.config/opencode/oh-my-opencode.json
- Show config file path in startup toast
- Add config load error warnings when JSON parsing or validation fails
- Extract getUserConfigDir to shared/config-path.ts for reuse

Fixes #97

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 02:20:46 +09:00
YeonGyu-Kim
a48fc3ea1f fix(todo-continuation-enforcer): increase delay to 5s and add write permission check (#89) (#105)
- Increase delay from 200ms to 5000ms to prevent firing too quickly before users can respond
- Add write permission check to skip continuation when previous agent lacks write/edit permissions
- Fixes destructive behavior where hook was overriding user wait commands

Resolves #89

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 01:31:04 +09:00
YeonGyu-Kim
67a1dba59b refactor(keyword-detector): inject keywords on every message (#99)
Remove first-message-only restriction and move keyword injection to chat.message
hook for consistent keyword presence across all messages.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-19 00:49:52 +09:00
YeonGyu-Kim
d7e45a1d10 fix(anthropic-auto-compact): ensure executeCompact always runs for truncation/revert regardless of model info
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-17 23:57:23 +09:00
YeonGyu-Kim
0625ebba5c Add star request prompt to LLM installation guide
Instruct LLM agents to ask users if they want to star the repository after successful installation, and run 'gh repo star code-yeongyu/oh-my-opencode' if they agree.

Updated across all 3 README files (English, Korean, Japanese) and session-notification hook.

🤖 Generated with assistance of OhMyOpenCode
2025-12-17 02:39:44 +09:00
YeonGyu-Kim
b984bfd9f3 fix(session-notification): skip notification for subagent sessions (#70)
- Import subagentSessions from claude-code-session-state in both manager.ts and session-notification.ts
- Add sessionID to subagentSessions Set when creating background task session
- Remove sessionID from subagentSessions when background task session is deleted
- Check if session is in subagentSessions before triggering notification

Fixes #70: Notification hook no longer triggers for subagent idle events

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-16 23:01:48 +09:00
YeonGyu-Kim
846bb7a6de Update README 2025-12-16 21:02:38 +09:00
YeonGyu-Kim
72d9d1385b fix(hook-message-injector): add validation to prevent empty message injection and improve logging
- 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)
2025-12-16 21:02:38 +09:00
YeonGyu-Kim
7293b8845d feat(hooks): add empty-message-sanitizer to prevent API errors from empty chat messages
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)
2025-12-16 21:02:38 +09:00
YeonGyu-Kim
3761d45712 Merge branch 'fix-empty-message-content' 2025-12-16 21:02:38 +09:00
YeonGyu-Kim
838f49bc42 fix(session-recovery): Replace empty text parts before injecting new ones
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)
2025-12-16 21:02:38 +09:00
YeonGyu-Kim
b461ef4496 feat(anthropic-auto-compact): Add tool output truncation recovery layer for token limit handling (#63)
- 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)
2025-12-16 21:02:38 +09:00
YeonGyu-Kim
407eeb3274 fix(anthropic-auto-compact): use OpenCode's official compaction mechanism and proper retry
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-16 21:02:38 +09:00
Junho Yeo
7c9b9f5096 fix(session-notification): Replace blocking MessageBox with native toast on Windows (#62)
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)
2025-12-16 21:02:38 +09:00
YeonGyu-Kim
be900454d8 fix: Improve Windows compatibility for paths and shell config
- 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)
2025-12-16 01:02:49 +09:00
YeonGyu-Kim
bf39c83171 Fix: detect empty content messages in session-recovery error patterns
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)
2025-12-15 23:36:47 +09:00
YeonGyu-Kim
cea64e40b8 feat(#61): Implement fallback mechanism for auto-compact token limit recovery
- 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)
2025-12-15 21:19:44 +09:00
YeonGyu-Kim
151ebbf407 Suppress stderr output from Linux notification commands to fix WSL errors
- Add 2>/dev/null to notify-send, paplay, and aplay commands
- Prevents DBus error logs in WSL environments (Issue #47)
- Maintains existing error handling behavior with .catch()

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-15 21:13:18 +09:00
YeonGyu-Kim
03a450131d refactor(hooks): improve interactive bash session tracking and command parsing
- Replace regex-based session extraction with quote-aware tokenizer
- Add proper tmux global options handling (-L, -S, -f, -c, -T)
- Add normalizeSessionName to strip :window and .pane suffixes
- Add findSubcommand for proper subcommand detection
- Add early error output return to avoid false state tracking
- Fix tool-output-truncator to exclude grep/Grep from generic truncation
- Fix todo-continuation-enforcer to clear reminded state on assistant response
- Add proper parallel stdout/stderr reading in interactive_bash tool
- Improve error handling with proper exit code checking

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-15 19:14:06 +09:00
YeonGyu-Kim
e8e10b9683 fix(hooks): clear remindedSessions on assistant response to enable repeated continuation
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)
2025-12-15 19:14:06 +09:00
YeonGyu-Kim
5cbef252a3 feat(tools): add interactive_bash tool for tmux session management
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)
2025-12-15 19:14:06 +09:00
YeonGyu-Kim
2524c90850 fix(hooks): add lowercase tool names to truncator hooks
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)
2025-12-15 19:14:06 +09:00
YeonGyu-Kim
355fa35651 fix(hooks): respect previous message's agent mode in message sending hooks
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)
2025-12-15 19:02:31 +09:00
YeonGyu-Kim
9aab980dc7 fix(session-recovery): fallback to filesystem when API parts empty
When OpenCode API doesn't return parts in message response,
read directly from filesystem using readParts(messageID).

This fixes session recovery failures where tool_use IDs couldn't
be extracted because API response had empty parts array.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-15 19:02:31 +09:00
YeonGyu-Kim
7fd52e27ce refactor(non-interactive-env): use args.env instead of command prepending
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-15 08:54:33 +09:00
YeonGyu-Kim
08481c046f refactor(non-interactive-env): remove regex-based TUI blocking
Keep only environment variable configuration and stdin redirection.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-15 08:49:19 +09:00
YeonGyu-Kim
192e8adf18 refactor(hooks): rename interactive-bash-blocker to non-interactive-env
- Replace regex-based command blocking with environment configuration
- Add cross-platform null device support (NUL for Windows, /dev/null for Unix)
- Wrap all bash commands with non-interactive environment variables
- Only block TUI programs that require full PTY
- Update schema, README docs, and all imports/exports

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-15 08:49:19 +09:00
Junho Yeo
5dd4d97c94 fix(auto-update-checker): resolve unknown version display and improve JSONC parsing (#54) 2025-12-15 08:39:21 +09:00