Skip to content

Conversation

@xnoto
Copy link
Owner

@xnoto xnoto commented Jan 25, 2026

Summary

  • Session-based agent identity: Multiple OpenCode sessions in the same directory now get unique agent IDs (derived from session slug like "cosmic-panda" or truncated session ID)
  • Config file support: New optional config file at ~/.config/agent-hub-daemon/config.json with env var override precedence
  • Custom coordinator AGENTS.md: Configurable path for coordinator instructions with user override locations
  • DNF repo fix: Added metadata_expire=300 to ensure reliable package upgrades without manual cache clearing

Features

Session-Based Agent Identity

  • Each session gets a unique agent ID enabling parallel agents on the same codebase
  • Agent ID derived from session slug (e.g., "cosmic-panda") or session ID
  • Session-agent mapping persisted in ~/.agent-hub/session_agents.json
  • Added gc_session_agents() for cleanup of stale mappings

Config File Support

  • Location: ~/.config/agent-hub-daemon/config.json
  • Precedence: environment variables > config file > defaults
  • All previously hardcoded values now configurable:
    • gc.message_ttl_seconds, gc.agent_stale_seconds, gc.interval_seconds
    • session.poll_seconds, session.cache_ttl
    • injection.workers, injection.retries, injection.timeout
    • metrics_interval

Custom Coordinator AGENTS.md

  • New config option: AGENT_HUB_COORDINATOR_AGENTS_MD / coordinator.agents_md
  • Search order:
    1. Explicit config path
    2. ~/.config/agent-hub-daemon/AGENTS.md
    3. ~/.config/agent-hub-daemon/COORDINATOR.md (alias)
    4. Package/system templates
    5. Minimal fallback

DNF Repository Fix

  • Added metadata_expire=300 and repo_gpgcheck=1 to xnoto.repo
  • Ensures DNF refreshes metadata every 5 minutes
  • Fixes issue where dnf upgrade didn't detect new releases without manual cache clear

Testing

  • 39 tests passing (21 new tests added)
  • tests/test_config.py - Config file loading and precedence
  • tests/test_session_agents.py - Session-based agent identity
  • tests/test_coordinator.py - Coordinator AGENTS.md resolution

Breaking Changes

None - fully backward compatible with existing setups.

- Add unique agent IDs per session (from slug or session ID), enabling
  multiple agents in the same directory
- Add config file support (~/.config/agent-hub-daemon/config.json)
- Add configurable coordinator AGENTS.md with user override locations
- Add gc_session_agents() for session-agent mapping cleanup
- Add metadata_expire to RPM repo for reliable upgrades
- All previously hardcoded values now configurable via env vars or config

BREAKING CHANGE: None - backward compatible with existing setups
@xnoto xnoto merged commit 85c13e5 into main Jan 25, 2026
14 checks passed
@xnoto xnoto deleted the feat/session-based-agent-identity branch January 25, 2026 17:20
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.

2 participants