Skip to content

chore: warn when coder_agent dir breaks Desktop file sync#507

Draft
zenithwolf1000 wants to merge 2 commits intomainfrom
add-dir-file-sync-warning
Draft

chore: warn when coder_agent dir breaks Desktop file sync#507
zenithwolf1000 wants to merge 2 commits intomainfrom
add-dir-file-sync-warning

Conversation

@zenithwolf1000
Copy link
Copy Markdown

@zenithwolf1000 zenithwolf1000 commented May 4, 2026

Adds a warning to the dir attribute on the coder_agent resource for Coder Desktop file sync compatibility.

Two mechanisms:

  1. Doc callout: A ~> Warning block in the dir schema description, rendered on the Terraform Registry.
  2. Runtime diagnostic: A diag.Warn in CreateContext and ReadWithoutTimeout that fires during terraform plan/apply when dir is set to a non-$HOME value. This warning flows through Terraform output into Coder build logs.

Refs DEVEX-227

Generated by Coder Agents

Copy link
Copy Markdown
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: you could also add a diag.Warn in agentResource() so that this will show up in the Terraform log output. May be too noisy though.

@code-asher
Copy link
Copy Markdown
Member

so that this will show up in the Terraform log output. May be too noisy though.

Ooo that sounds good, and I think that would obviate the need for coder/coder#24951? Feels to me like having the warning in the provider makes more sense.

@zenithwolf1000 zenithwolf1000 changed the title chore: add file sync warning to coder_agent dir attribute chore: warn when coder_agent dir breaks Desktop file sync May 6, 2026
@zenithwolf1000 zenithwolf1000 force-pushed the add-dir-file-sync-warning branch from 56157ca to ddac3ee Compare May 6, 2026 19:54
@zenithwolf1000 zenithwolf1000 force-pushed the add-dir-file-sync-warning branch from ddac3ee to 8c8b970 Compare May 6, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants