HKUDS/Vibe-Trading · error · ValueError
group_message_buffer_size must be > 0
Error message
group_message_buffer_size must be > 0
What it means
Pydantic field validator on SignalConfig rejects group_message_buffer_size values <= 0. It is raised at model construction time, before any Signal channel is started.
Source
Thrown at agent/src/channels/signal.py:329
enabled: bool = False
phone_number: str = "" # Your Signal phone number (e.g., "+1234567890")
daemon_host: str = "localhost"
daemon_port: int = 8080
group_message_buffer_size: int = 20 # Number of recent group messages to keep for context
# Override the directory signal-cli writes inbound attachments to. When
# None, defaults to ~/.local/share/signal-cli/attachments (the daemon's
# platform default on Linux). Set this if the daemon is running with a
# custom XDG_DATA_HOME or on macOS/Windows where the default path differs.
attachments_dir: str | None = None
dm: SignalDMConfig = Field(default_factory=SignalDMConfig)
group: SignalGroupConfig = Field(default_factory=SignalGroupConfig)
@field_validator("group_message_buffer_size")
@classmethod
def _validate_buffer_size(cls, v: int) -> int:
if v <= 0:
raise ValueError("group_message_buffer_size must be > 0")
return v
@computed_field # type: ignore[prop-decorator]
@property
def allow_from(self) -> list[str]:
"""Aggregate allowlist for the base-class is_allowed() check.
Returns the union of dm.allow_from and group.allow_from so the base
channel gate sees a populated list when either sub-policy is configured.
A ``"*"`` wildcard in either sub-list propagates to allow all.
"""
return list(dict.fromkeys(self.dm.allow_from + self.group.allow_from))
class SignalChannel(BaseChannel):
"""
Signal channel using signal-cli daemon via HTTP JSON-RPC interface.
View on GitHub (pinned to 80ffdda44c)
Solutions
- Set group_message_buffer_size to a positive integer (e.g. 100)
- Check env parsing: ensure empty strings don't coerce to 0
- Remove the key entirely to use the built-in default
Example fix
# before SignalConfig(group_message_buffer_size=0) # after SignalConfig(group_message_buffer_size=100)
Defensive patterns
Strategy: validation
Validate before calling
size = cfg_overrides.get('group_message_buffer_size', 100)
if size <= 0:
raise ConfigError('group_message_buffer_size must be positive') Prevention
- Validate numeric env overrides before constructing config
- Use the library default unless a specific buffer size is needed
When it happens
Trigger: Instantiating SignalConfig(group_message_buffer_size=0) or a negative value, typically from env vars or YAML config.
Common situations: Env var left empty and parsed as 0, typo in config file, or defaulting logic that computes a size of 0 when no override is set.
Understand the failure class
Background: Config validation failed: what "invalid value for {key}" and settings-rejection errors mean across 19 open-source libraries — this error's family across 19 libraries.
Related errors
- SWARM_WORKER_RETRY_MAX_DELAY_S must be greater than or equal
- Unsupported config file format: {suffix or '<none>'}
- HTTP MCP servers require an explicit type of 'sse' or 'strea
- stdio MCP servers require a command
- stdio MCP servers do not accept url/headers
AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28).
Data as JSON: /api/errors/0e56ed07a2a00f59.
Report an issue: GitHub.