hermes-agent/hermes_cli
HiaHia 8feeb0ccb8 fix(gateway): retry launchd bootstrap after bootout on EIO for install/start
On macOS, `launchctl bootstrap` of a label still registered in the domain
fails with 5: Input/output error (EIO). That is the *already loaded* case — a
stale registration from an interrupted restart or a bootout that didn't settle
— recoverable by booting the leftover out and bootstrapping again, and distinct
from the domain being genuinely unmanageable.

launchd_install and launchd_start (both bootstrap paths) treated exit 5 as
'launchd cannot manage this macOS version' and silently degraded to a detached
process, losing auto-start at login and crash-restart. Centralize bootstrap in
_launchctl_bootstrap(), which on EIO boots the stale label out and retries once;
only if the retry also fails does the error propagate so callers apply their
existing _launchctl_domain_unsupported fallback for a genuinely broken domain.

launchd_restart already boots out before bootstrapping (its drained job is
almost always still registered, so a plain bootstrap would hit EIO on the common
path), so it keeps its explicit pre-bootout rather than routing through the
bootstrap-first helper. Corrected the stale exit-5 comment that claimed it
always meant an unmanageable domain.

Adds TestLaunchctlBootstrapEioRetry covering clean bootstrap (no bootout),
EIO -> bootout -> retry success, persistent EIO re-raise, and non-EIO re-raise
without a spurious bootout.
2026-07-01 03:21:20 -07:00
..
dashboard_auth
…
proxy
…
subcommands fix(security): require explicit consent before uploading debug logs 2026-07-01 00:38:17 -07:00
__init__.py
…
_parser.py
…
_subprocess_compat.py
…
active_sessions.py
…
auth.py fix(auth): serialize Codex OAuth pool refresh under the auth-store lock (#56233) 2026-07-01 02:45:07 -07:00
auth_commands.py
…
azure_detect.py
…
backup.py
…
banner.py
…
blueprint_cmd.py
…
browser_connect.py
…
build_info.py
…
bundles.py
…
callbacks.py
…
checkpoints.py
…
claw.py
…
cli_agent_setup_mixin.py
…
cli_commands_mixin.py fix(security): require explicit consent before uploading debug logs 2026-07-01 00:38:17 -07:00
cli_output.py
…
clipboard.py
…
codex_models.py
…
codex_runtime_plugin_migration.py
…
codex_runtime_switch.py
…
colors.py
…
commands.py feat(debug): support /debug [nous|local] in the CLI/TUI slash command 2026-06-30 17:29:23 -07:00
completion.py
…
config.py fix(gateway,cron): guard cron model-tool path + add auto-resume loop breaker (#30719) 2026-07-01 02:48:36 -07:00
container_boot.py fix(container-boot): also autostart a gateway stranded in 'degraded' 2026-06-29 21:12:36 -07:00
context_switch_guard.py
…
copilot_auth.py fix(copilot): prefer endpoints.api for base URL, guard empty chat base URL 2026-06-30 03:27:41 -07:00
cron.py fix(gateway,cron): guard cron model-tool path + add auto-resume loop breaker (#30719) 2026-07-01 02:48:36 -07:00
curator.py
…
curses_ui.py
…
dashboard_register.py
…
debug.py fix(security): require explicit consent before uploading debug logs 2026-07-01 00:38:17 -07:00
default_soul.py
…
dep_ensure.py
…
diagnostics_upload.py feat(debug): drop dead confirm step from --nous upload (stateless NAS) 2026-06-30 17:29:23 -07:00
dingtalk_auth.py
…
doctor.py fix(doctor): ignore disabled toolsets in missing-API-key summary 2026-07-01 01:25:43 -07:00
dump.py
…
env_loader.py
…
fallback_cmd.py
…
fallback_config.py
…
gateway.py fix(gateway): retry launchd bootstrap after bootout on EIO for install/start 2026-07-01 03:21:20 -07:00
gateway_enroll.py
…
gateway_windows.py
…
goals.py
…
gui_uninstall.py
…
hooks.py feat(agent): add pre_verify hook and verify-on-stop coding guidance 2026-06-30 00:59:29 -05:00
inventory.py
…
journey.py feat(journey): wire list/delete/edit through CLI, RPC, and REST 2026-06-30 15:07:22 -05:00
kanban.py
…
kanban_db.py
…
kanban_decompose.py
…
kanban_diagnostics.py
…
kanban_specify.py
…
kanban_swarm.py
…
logs.py
…
main.py feat(journey): CLI + TUI learning timeline (/journey) 2026-06-30 04:44:58 -05:00
managed_scope.py
…
managed_uv.py
…
mcp_catalog.py
…
mcp_config.py
…
mcp_picker.py
…
mcp_security.py
…
mcp_startup.py fix(mcp): late-refresh must see desktop/dashboard discovery thread owner (#55514) 2026-06-30 02:08:37 -07:00
memory_oauth.py
…
memory_providers.py
…
memory_setup.py
…
middleware.py
…
migrate.py
…
moa_cmd.py
…
moa_config.py fix(moa): disabled presets no longer hijack a plain model switch (#55598) 2026-06-30 04:22:32 -07:00
model_catalog.py
…
model_cost_guard.py
…
model_normalize.py
…
model_setup_flows.py
…
model_switch.py
…
models.py
…
nous_account.py
…
nous_auth_keepalive.py
…
nous_billing.py
…
nous_subscription.py
…
oneshot.py
…
pairing.py
…
partial_compress.py
…
pets.py
…
platforms.py
…
plugins.py fix(security): bind tool_override authorization to handler's defining plugin module 2026-06-30 04:00:42 -07:00
plugins_cmd.py feat(plugins): enable-time consent prompt for tool_override grant 2026-06-30 04:00:42 -07:00
portal_cli.py
…
profile_describer.py
…
profile_distribution.py
…
profiles.py
…
projects_cmd.py
…
projects_db.py
…
prompt_size.py
…
provider_catalog.py
…
providers.py
…
psutil_android.py
…
pt_input_extras.py
…
pty_bridge.py
…
relaunch.py
…
runtime_provider.py fix(provider): route api.anthropic.com to anthropic_messages api_mode (#32243) 2026-07-01 02:18:56 -07:00
secret_prompt.py
…
secrets_cli.py
…
security_advisories.py
…
security_audit.py
…
security_audit_startup.py
…
send_cmd.py
…
service_manager.py
…
session_listing.py
…
session_recap.py
…
setup.py
…
setup_whatsapp_cloud.py
…
skills_config.py
…
skills_hub.py
…
skin_engine.py
…
slack_cli.py
…
sqlite_util.py
…
status.py fix(cli): redact status API keys with --all 2026-06-30 04:38:43 -07:00
stdio.py
…
suggestions_cmd.py
…
telegram_managed_bot.py
…
timeouts.py
…
tips.py
…
tools_config.py feat(xai): Imagine public-URL storage, chaining & video edit/extend 2026-06-29 21:11:58 -07:00
toolset_validation.py
…
uninstall.py
…
voice.py
…
web_git.py
…
web_server.py feat(journey): wire list/delete/edit through CLI, RPC, and REST 2026-06-30 15:07:22 -05:00
webhook.py
…
win_pty_bridge.py
…
write_approval_commands.py
…
xai_retirement.py
…