Skip to content

Global AGENTS.md symlink is surfaced as symlink blob instead of resolved file contents #58

Description

@jamesx0416

Summary

When the global Codex AGENTS.md is a symlink, DevSpace appears to pass the symlink entry/blob to the assistant instead of resolving and loading the target file contents.

Observed

Opening a workspace returned an agentsFiles entry like:

path: /root/.codex/AGENTS.md
content:
XSym
0016
b1b33b2370234fd17a441470bf180989
skills/AGENTS.md

That content looks like symlink metadata / pointer data, not the actual instructions from the target file.

DevSpace also reported a diagnostic for the target path:

description is required
path: /root/.codex/skills/AGENTS.md

Expected

Either:

  1. Resolve /root/.codex/AGENTS.md and load the contents of the symlink target, or
  2. Explicitly report that the file is a symlink and was not followed.

Why it matters

The current behavior makes symlink metadata look like real agent instructions, so the assistant receives garbage context instead of the intended global instructions.

Minimal repro shape

  • Global AGENTS.md exists at /root/.codex/AGENTS.md
  • It is a symlink pointing to skills/AGENTS.md
  • Open a workspace through DevSpace
  • Inspect returned agentsFiles

Lazy fix suggestion

Before reading an AGENTS.md, resolve symlinks with the platform filesystem call and read the target file contents. If symlink following is intentionally disallowed, return a clear diagnostic instead of putting the symlink blob in content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions