Skip to content

[Critical] Config Self-Mutation Bug + Safe Network Change Process #4311

@wdi-dave-roberts

Description

@wdi-dave-roberts

Summary

Critical reliability issue: Clawdbot can self-mutate its config file, causing unexpected gateway crashes. This creates business continuity risk for production deployments.

Timeline of Events (2026-01-29)

  1. Port conflict: Gateway crash loop on 18789 (kernel TIME-WAIT state)
  2. Emergency port change: Moved to 18790 to restore service
  3. Config mutations: Direct JSON edits triggered background process that rewrote config
  4. System instability: Gateway crashed multiple times due to invalid config values
  5. Business impact: Unreliable remote access to critical business systems

The Config Self-Mutation Bug

Symptom: Config file gets rewritten by background Clawdbot process, overriding manual changes.

Dangerous sequence:

  • User makes rapid config changes (bypassing proper API)
  • Background validation/reconciliation process detects 'inconsistency'
  • Process overwrites manual config with computed values
  • Computed values may be invalid format, causing crash loop

Business risk: A working config can spontaneously become invalid, causing service outages.

Safe Network Change Process (Needed)

Current gap: No documented safe process for network configuration changes that could disrupt business operations.

Requirements:

  • Backup/rollback capability
  • Validation at each step
  • Proper use of clawdbot config API (not direct JSON edits)
  • Business continuity considerations

Immediate Action

We're about to attempt port reversion (18790 → 18789) using ultra-conservative process with:

  • Pre-flight safety checks
  • Step-by-step validation
  • Full rollback plan
  • Documentation of lessons learned

Request

  1. Fix the config mutation bug - background processes should not overwrite user config
  2. Document safe network change procedures - especially for production deployments
  3. Add config file locking or validation to prevent this failure mode
  4. Improve error messages when config conflicts occur

Business Context

This isn't just a technical issue - it's about trust. Businesses depend on reliable systems. Self-mutating configs that cause surprise outages make AI assistants a liability instead of an asset.

For businesses running critical operations through Clawdbot, config reliability is essential.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions