Remove OpenCode built-in tools (lsp_goto_definition, lsp_find_references, lsp_symbols, lsp_servers) that are not provided by oh-my-opencode. Keep only lsp_diagnostics, lsp_prepare_rename, lsp_rename.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
lsp_goto_definition, lsp_find_references, lsp_symbols are provided by OpenCode, not oh-my-opencode. Keep only the 4 tools we actually provide: lsp_diagnostics, lsp_servers, lsp_prepare_rename, lsp_rename.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
The watermark (commit footer and co-author) was inconsistently applied because:
1. The skill tool didn't receive gitMasterConfig
2. The approach was 'default ON, inject DISABLED override' which LLMs sometimes ignored
This refactors to 'inject only when enabled' approach:
- Remove hardcoded watermark section from base templates
- Dynamically inject section 5.5 based on config values
- Default is still ON (both true when no config)
- When both disabled, no injection occurs (clean prompt)
Also fixes missing config propagation to skill tool and createBuiltinAgents.
feat(concurrency): prevent background task races and leaks
Summary
Fixes race conditions and memory leaks in the background task system that could cause "all tasks complete" notifications to never fire, leaving parent sessions waiting indefinitely.
Why This Change?
When background tasks are tracked for completion notifications, the system maintains a pendingByParent map to know when all tasks for a parent session are done. Several edge cases caused "stale entries" to accumulate in this map:
1. Re-registering completed tasks added them back to pending tracking, but they'd never complete again
2. Changing a task's parent session left orphan entries in the old parent's tracking set
3. Concurrent task operations could cause double-acquisition of concurrency slots
These bugs meant the system would sometimes wait forever for tasks that were already done.
What Changed
- Concurrency management: Added proper acquire/release lifecycle with cleanup on process exit (SIGINT, SIGTERM)
- Parent session tracking: Fixed cleanup order. Now clears old parent's tracking before updating parent ID
- Stale entry prevention: Only tracks tasks that are actually running; actively cleans up completed tasks
- Renamed registerExternalTask → trackTask: Clearer name (the old name implied external API consumers, but it's internal)
Update BackgroundManager to rename the method for tracking external tasks, improving clarity and consistency in task management. Adjust related tests to reflect the new method name.
Previously, continuation hooks (todo-continuation, boulder-continuation, ralph-loop)
and background tasks resolved model info from filesystem cache, which could be stale
or missing. This caused session.prompt to fallback to default model (Sonnet) instead
of using the originally configured model (e.g., Opus).
Now all session.prompt calls first try API (session.messages) to get current model
info, with filesystem as fallback if API fails.
Affected files:
- todo-continuation-enforcer.ts
- sisyphus-orchestrator/index.ts
- ralph-loop/index.ts
- background-agent/manager.ts
- sisyphus-task/tools.ts
- hook-message-injector/index.ts (export ToolPermission type)
- Delete PSModulePath in beforeEach() to prevent CI cross-platform detection
- Set SHELL=/bin/bash to ensure tests start with clean Unix-like environment
- Fixes flaky test failures on GitHub Actions CI runners
- Tests can still override these values for PowerShell-specific behavior
Add formatDetailedError helper that includes:
- Full args dump (description, category, agent, skills)
- Session ID and agent info
- Stack trace (first 10 lines)
Applied to all catch blocks for better debugging.
When user types '/start-work my-plan ultrawork', the hook now:
1. Extracts plan name from <user-request> section
2. Strips ultrawork/ulw keywords from the plan name
3. Searches for matching plan (exact then partial match)
4. Uses the matched plan instead of resuming stale boulder state
This fixes the bug where '/start-work [PLAN] ultrawork' would:
- Include 'ultrawork' as part of the plan name argument
- Ignore the explicit plan and resume an old stale plan from boulder.json
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Enhance the BackgroundManager to properly clean up pending tasks when the parent session ID changes. This prevents stale entries in the pending notifications and ensures that the cleanup process is only executed when necessary, improving overall task management reliability.
Restore zero-tolerance policy for visual/styling changes in frontend files.
Visual keyword detection now triggers mandatory delegation to frontend-ui-ux-engineer.
Update BackgroundManager to track batched notifications only for running tasks. Implement cleanup for completed or cancelled tasks to avoid stale entries in pending notifications. Enhance logging to include task status for better debugging.
Add functionality to manage process cleanup by registering and unregistering signal listeners. This ensures that BackgroundManager instances properly shut down and remove their listeners on process exit. Introduce tests to verify listener removal after shutdown.
- Update generated timestamp and commit hash metadata
- Normalize agent model names with provider prefixes (anthropic/, opencode/, google/)
- Remove deprecated Google OAuth/Antigravity references
- Update line counts and complexity hotspot entries
- Adjust test count from 82 to 80+ files and assertions from 2559+ to 2500+
🤖 Generated with assistance of oh-my-opencode
LLMs often call look_at with 'path' instead of 'file_path' parameter,
causing TypeError and infinite retry loops.
- Add normalizeArgs() to accept both 'path' and 'file_path'
- Add validateArgs() with clear error messages showing correct usage
- Add tests for normalization and validation
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ensure queue waiters settle once, centralize completion with status guards, and release slots before async work so shutdown and cancellations don’t leak concurrency. Internal hardening only.