Skip to content

fix: correct coder agent architecture to arm64#413

Merged
nazia-datainn merged 4 commits intodevelopfrom
fix/coder-agent-arm64-architecture
Jan 1, 2026
Merged

fix: correct coder agent architecture to arm64#413
nazia-datainn merged 4 commits intodevelopfrom
fix/coder-agent-arm64-architecture

Conversation

@MohsinHashmi-DataInn
Copy link
Copy Markdown
Contributor

Summary

Fixes critical workspace health issue where the Coder agent fails to connect, causing the workspace to remain in an unhealthy state with "agent is taking too long to connect" error.

Root Cause

The Coder template specified arch = "amd64" for the agent, but the dev-server runs on ARM64 architecture (aarch64). This caused Coder to download an x86_64 binary that cannot execute on the ARM64 platform, resulting in "Exec format error".

Changes

File: .coder/template.tf (line 148)

resource "coder_agent" "main" {
-  arch = "amd64"
+  arch = "arm64"
   os   = "linux"
   dir  = "/workspaces/SimpleAccounts-UAE"

Impact

Fixes:

  • Agent connection timeout (210s wait → successful connection)
  • "Exec format error" when executing Coder binary
  • Workspace health status (unhealthy → healthy)

Issues Resolved:

⦾ timeout [210s]  ✘ agent is taking too long to connect
sh: 90: ./coder: Exec format error
ERROR: Downloaded agent binary returned unexpected version output

Testing Evidence

Before Fix:

  • Container architecture: aarch64 (ARM64)
  • Template specified: amd64 (x86_64)
  • Result: Binary mismatch → Exec format error

After Fix:

  • Container architecture: aarch64 (ARM64)
  • Template specified: arm64 (matches!)
  • Expected Result: Agent connects successfully → Workspace healthy

Additional Context

This issue was discovered during workspace deployment diagnostics:

  1. Workspace showed as "Started" but "HEALTHY = false"
  2. Agent logs revealed "Exec format error"
  3. Container inspection confirmed ARM64 architecture
  4. Template audit found architecture mismatch

Related Cleanup

Also cleaned up orphaned PostgreSQL volume data that was causing PostgreSQL 18 compatibility issues (performed separately on dev-server).

Test Plan

  • Deploy workspace with updated template
  • Verify agent downloads arm64 binary
  • Confirm agent connects within timeout period
  • Validate workspace reaches healthy state
  • Test VS Code, terminal, and port forwarding functionality

🤖 Generated with Claude Code

mohsin-wiser and others added 4 commits December 31, 2025 13:17
This fixes the workspace health issue where the Coder agent fails to start
with "Exec format error" because the downloaded binary architecture doesn't
match the container's actual architecture.

Changes:
- Update coder_agent.main.arch from "amd64" to "arm64"
- Matches actual container platform running on aarch64 (ARM64)

Impact:
- Resolves agent connection timeout (210s)
- Fixes "Exec format error" when executing coder binary
- Enables workspace to reach healthy state

Root Cause Analysis:
The dev-server runs on ARM64 architecture (aarch64), but the template
specified amd64, causing Coder to download an x86_64 binary that cannot
execute on ARM64 platform.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown
Contributor

@nazia-datainn nazia-datainn left a comment

Choose a reason for hiding this comment

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

GTG

@nazia-datainn nazia-datainn merged commit 8192d93 into develop Jan 1, 2026
19 checks passed
@nazia-datainn nazia-datainn deleted the fix/coder-agent-arm64-architecture branch January 1, 2026 16:33
Copy link
Copy Markdown
Contributor

@nazia-datainn nazia-datainn left a comment

Choose a reason for hiding this comment

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

gtg

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