Skip to content

[Bug]: openwiki --update targets the wrong project (documents a different repo than the current working directory) #310

Description

@acoalex

Description

Running openwiki --update from inside one project directory makes the agent document a completely different, unrelated project instead of the current working directory. It picks the wrong source repository and reports "No edits needed" against the wrong wiki.

Steps to Reproduce

  1. Have two projects on disk, each previously used with OpenWiki:
    • /Users/alex/workspace/ip21 (PowerShell SharePoint migration scripts) — documented earlier
    • /Users/alex/workspace/competiciones-pesca-gipuzkoako (Symfony/PHP app) — the current project
  2. cd /Users/alex/workspace/competiciones-pesca-gipuzkoako
  3. Run openwiki --update

Expected Behavior

The agent should document the current working directory (competiciones-pesca-gipuzkoako) and update its wiki.

Actual Behavior

The agent ignores the current directory and instead explores and validates the other project (ip21):

  • "The wiki is empty and no connectors are configured. Let me check for the source repository with the PowerShell SharePoint migration scripts."
  • "Found the PowerShell scripts in /Users/alex/workspace/ip21/. Let me explore this project thoroughly."
  • "There's already an existing wiki at /Users/alex/workspace/ip21/openwiki/."
  • It then runs cd /Users/alex/workspace/ip21 && git diff HEAD --name-only to check for changes.
  • Final verdict validates ip21 pages (topics/ip21-architecture.md, topics/ip21-sharepoint.md, quickstart.md, etc.) and concludes "No edits needed. The wiki is already current."

Environment

  • OpenWiki v0.1.1
  • Provider: OpenAI-compatible, model LurNova/Titan-Coder
  • LangSmith tracing: disabled
  • OS: macOS (Darwin 25.5.0)

Additional Context

The wiki appears to live in a global location: the run states "The filesystem tools use a virtual root where / = ~/.openwiki/wiki" and "The wiki exists at ~/.openwiki/wiki". It looks like OpenWiki is resolving the target repository from previously-persisted global state (the last documented project, ip21) rather than from the current working directory. Because that global wiki/config is shared across projects, running the CLI from a different project still targets the old one.

Expected: the source repo should be derived from the CWD (or an explicit flag), and wiki state should be scoped per-repository rather than shared globally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions