Skip to content

[Bug]: Glob tool cannot find files in hidden directories (.sisyphus/) - Notepad system broken #631

@chilipvlmer

Description

@chilipvlmer

Prerequisites

  • I have searched existing issues to avoid duplicates
  • I am using the latest version of oh-my-opencode
  • I have read the documentation

Bug Description

The glob tool cannot find files in hidden directories (directories starting with .), which breaks core functionality including:

  1. Notepad wisdom system - Agents cannot read accumulated learnings from .sisyphus/notepads/
  2. Plan file detection - Plan discovery fails for hidden directory patterns
  3. Any glob pattern targeting .sisyphus/, .git/, .config/ etc.

Steps to Reproduce

  1. Create files in a hidden directory, e.g., .sisyphus/notepads/test/learnings.md
  2. Ask an agent to search for them: glob(".sisyphus/notepads/**/*.md")
  3. Result: No files found (empty array)
  4. Expected: Files should be found

Expected Behavior

Agents should be able to find and read files in:

  • .sisyphus/plans/
  • .sisyphus/notepads/
  • .sisyphus/drafts/
  • .sisyphus/evidence/

Actual Behavior

glob(".sisyphus/**/*.md")      // Returns: [] (empty array)
glob(".sisyphus/plans/*.md")   // Returns: [] (empty array)

The notepad lookup fails, the agent thinks there is no directory existing.

Doctor Output

oMoMoMoMo... Doctor


Installation
────────────────────────────────────────
  ✗ OpenCode Installation → OpenCode is not installed
  ✓ Plugin Registration → Registered (pinned: beta)

Configuration
────────────────────────────────────────
  ✓ Configuration Validity → Valid JSON config

Authentication
────────────────────────────────────────
  ✓ Anthropic (Claude) Auth → Auth plugin available
  ○ OpenAI (ChatGPT) Auth → Auth plugin not installed
  ○ Google (Gemini) Auth → Auth plugin not installed

Dependencies
────────────────────────────────────────
  ⚠ AST-Grep CLI → Not installed (optional)
  ✓ AST-Grep NAPI → installed
  ⚠ Comment Checker → Not installed (optional)

Tools & Servers
────────────────────────────────────────
  ⚠ GitHub CLI → Not installed (optional)
  ⚠ LSP Servers → No LSP servers detected
  ✓ Built-in MCP Servers → 2 built-in servers enabled
  ○ User MCP Configuration → No user MCP configuration found

Updates
────────────────────────────────────────
  ✓ Version Status → Pinned to version beta

Summary
────────────────────────────────────────

  6 passed, 1 failed, 4 warnings, 3 skipped
  Total: 14 checks in 179ms

Error Logs

Configuration

Additional Context

Root Cause

File: src/agents/orchestrator-sisyphus.ts
Lines: 975 & 1329

Agents are instructed to use:

glob(".sisyphus/notepads/{plan-name}/*.md")

However, the glob tool excludes hidden directories by default. The hidden?: boolean option exists but is never used by agents.

Glob Tool Capability (exists but unused)

The glob tool has the hidden option in src/tools/glob/types.ts:

interface GlobOptions {
  hidden?: boolean;  // ← Option exists!
}

And implementation exists in src/tools/glob/cli.ts:

  • ripgrep: Adds --hidden flag
  • find: Removes -not -path "*/.*" exclusion
  • PowerShell: Adds -Force parameter

But no agents use this option - there's no documentation or guidance for it.

Suggested Fixes

Option A (Recommended): Auto-fallback in glob tool

  • When glob returns empty and pattern could match hidden files, auto-retry with hidden: true
  • Transparent fix, no agent changes needed

Option B: Document in agent prompts

  • Add guidance: "Use glob(pattern, { hidden: true }) for hidden directories"

Option C: Fix orchestrator-sisyphus.ts directly

  • Update lines 975 & 1329 to use hidden: true

Environment

  • oh-my-opencode: v3.0.0-beta.2
  • Platform: Windows

Operating System

Windows

OpenCode Version

1.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions