Skip to content

agent-shell-devcontainer-resolve-path throws error in projects without .devcontainer/devcontainer.json #573

@systemfreund

Description

@systemfreund

If agent-shell-path-resolver-function is set globally to #'agent-shell-devcontainer-resolve-path, sessions in projects without .devcontainer/devcontainer.json fail with (error "Not found:"). The resolver unconditionally calls agent-shell-devcontainer--get-workspace-path, and the helper throws an error when the config file is missing.

Practical consequence: Anyone using projects with and without devcontainers in the same Emacs cannot simply set the variable globally, but needs their own wrapper that first checks whether the project is actually a devcontainer project.

Proposal: If no .devcontainer/devcontainer.json exists in the CWD, agent-shell-devcontainer-resolve-path should return the path unchanged. This makes the variable safe to set globally, and devcontainer translation only applies when relevant.

Checklist

  • I agree to communicate with the author myself (not AI-generated).
  • I've read the README's Filing issues section.
  • I'm running the latest versions (fill in below).
    • agent-shell version:
    • acp.el version:
    • ACP package (e.g. claude-agent-acp) version:
    • Agent CLI (e.g. claude, gemini) version:
  • For requesting new agent support, I'm including a link to the ACP-capable agent or related ACP package.
  • For issues, I'm including ACP traffic (as per README).

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