Skip to content

[ACP compat] use normal filesystem path for skill finding response #23885

Closed as not planned

Description

@johnnychen94

Description

The following data is the ACP protocol payload we captured. It indicates that if we contain the file:///<fs_abspath> in the find skill response, it's very easy for LLM to join the path with the prefix file:///<fs_abspath>.

I didn't verify if opencode itself's internal read file tool handles the file:/// URL style path, but for ACP compatibility, since the ACP protocol supports fs/* tool overriding, it's very easy that a potential ACP editor to pass a read file implementation that has no idea of the internal file:/// rule of opencode and hits the issue. Even if we patch the read/write file tools to support URL formats, we can't guarantee that the LLM generates the correct path for other tool calls (e.g., shell).

I suggest we strip the file:/// prefix in the find skill response, or tweak the prompt with an explicit comment that "file:///` is a URL format.

Plugins

none

OpenCode version

v1.14.20

Steps to reproduce

We have an internal ACP editor that captures the ACP payload below, I believe checking it would explain the issue.

Screenshot and/or share link

`Base directory for this skill: ${base}`,

#23885 is not related

Operating System

No response

Terminal

{
    "kind": "trace.record",
    "record": {
        "traceId": "1776861001601-4bhi3e:31",
        "sessionId": "ses_24ad525dbffeBJJt67xDS2DQ6S",
        "scopeId": "1776861001601-4bhi3e",
        "scopeType": "live-turn",
        "lane": "editor",
        "direction": "outbound",
        "timestamp": "2026-04-22T12:30:11.014Z",
        "seq": 31,
        "method": "session.update",
        "status": "sent",
        "summary": "session.update",
        "payload": {
            "type": "session.update",
            "notification": {
                "sessionId": "ses_24ad525dbffeBJJt67xDS2DQ6S",
                "update": {
                    "sessionUpdate": "tool_call_update",
                    "toolCallId": "call_function_365u0x3ova71_1",
                    "status": "completed",
                    "kind": "other",
                    "content": [
                        {
                            "type": "content",
                            "content": {
                                "type": "text",
                                "text": "<skill_content name=\"syslab-performance-optimization\">\n# Skill: syslab-performance-optimization\n\n# [skill content] \n\nBase directory for this skill: file:///C:/Users/TR/.config/opencode/skills/syslab-performance-optimization\nRelative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.\nNote: file list is sampled.\n\n<skill_files>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\workflows\\performance-plan-execution-rules.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\workflows\\performance-plan-contract.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\templates\\performance-report-template.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\templates\\performance-plan-template.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\scripts\\analyze-script-deps.jl</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\rules\\performance-checklist.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\rules\\performance-analysis-rules.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\examples\\performance-optimization-task.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\references\\julia-profiling.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\references\\julia-performance-tips.md</file>\n</skill_files>\n</skill_content>"
                            }
                        }
                    ],
                    "title": "Loaded skill: syslab-performance-optimization",
                    "rawInput": {
                        "name": "syslab-performance-optimization"
                    },
                    "rawOutput": {
                        "output": "<skill_content name=\"syslab-performance-optimization\">\n# Skill: syslab-performance-optimization\n\n# [skill content] \n\nBase directory for this skill: file:///C:/Users/TR/.config/opencode/skills/syslab-performance-optimization\nRelative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.\nNote: file list is sampled.\n\n<skill_files>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\workflows\\performance-plan-execution-rules.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\workflows\\performance-plan-contract.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\templates\\performance-report-template.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\templates\\performance-plan-template.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\scripts\\analyze-script-deps.jl</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\rules\\performance-checklist.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\rules\\performance-analysis-rules.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\examples\\performance-optimization-task.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\references\\julia-profiling.md</file>\n<file>C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\references\\julia-performance-tips.md</file>\n</skill_files>\n</skill_content>",
                        "metadata": {
                            "name": "syslab-performance-optimization",
                            "dir": "C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization",
                            "truncated": false
                        }
                    }
                }
            }
        }
    }
}

{
    "kind": "trace.record",
    "record": {
        "traceId": "1776861001601-4bhi3e:76",
        "sessionId": "ses_24ad525dbffeBJJt67xDS2DQ6S",
        "scopeId": "1776861001601-4bhi3e",
        "scopeType": "live-turn",
        "lane": "editor",
        "direction": "inbound",
        "timestamp": "2026-04-22T12:30:25.318Z",
        "seq": 76,
        "method": "session/update",
        "status": "received",
        "summary": "session/update",
        "payload": {
            "sessionId": "ses_24ad525dbffeBJJt67xDS2DQ6S",
            "update": {
                "sessionUpdate": "tool_call_update",
                "toolCallId": "call_function_971t6lbgx3v0_1",
                "status": "failed",
                "kind": "read",
                "title": "read",
                "rawInput": {
                    "filePath": "file:///C:/Users/TR/.config/opencode/skills/syslab-performance-optimization/workflows/performance-plan-contract.md"
                },
                "content": [
                    {
                        "type": "content",
                        "content": {
                            "type": "text",
                            "text": "Error: File not found: E:\\Temp26\\20260407-Syslab AI插件\\demo\\性能优化\\file:\\C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\workflows\\performance-plan-contract.md"
                        }
                    }
                ],
                "rawOutput": {
                    "error": "Error: File not found: E:\\Temp26\\20260407-Syslab AI插件\\demo\\性能优化\\file:\\C:\\Users\\TR\\.config\\opencode\\skills\\syslab-performance-optimization\\workflows\\performance-plan-contract.md"
                }
            }
        }
    }
}

Activity

  1. github-actions commented on Apr 22, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The issue does not use one of the required issue templates (Bug Report, Feature Request, or Question). Please resubmit using the appropriate template — this appears to be a bug report or feature request.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 22, 2026
  3. github-actions commented on Apr 22, 2026

    @github-actions
    Contributor

    Thank you for providing detailed context and a reproduction trace — the technical content is clear and well-explained.

    However, this issue still does not use one of the three required issue templates. Every issue must follow one of:

    1. Bug Report — requires a Description field with real content (and ideally reproduction steps)
    2. Feature Request — title must start with [FEATURE]:, requires a verification checkbox and description
    3. Question — requires a Question field with real content

    This appears to be either a bug report or a feature request. Please edit the issue to match the appropriate template structure. You can find the templates in the repository's issue template selector when creating a new issue.

    Once updated, the needs:compliance label will be removed.

  4. github-actions commented on Apr 22, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now meets the contributing guidelines and has been marked as compliant.

  5. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions