Commit Graph
165 Commits
Author SHA1 Message Date
hermes 8705b128ea Memory: byte-budgeted index, memory_search (BM25), auto extraction on compaction/exit 2026-11-30 12:46:16 +00:00
johannes 2866eeee28 feat: add consultant feature for asking a configured model mid-session
build / version (push) Successful in 17s
build / build (aarch64-apple-darwin) (push) Successful in 4m52s
build / build (x86_64-unknown-linux-musl) (push) Successful in 5m7s
build / release (push) Successful in 37s
Adds a new 'consult' tool that makes single tool-less calls to a configured
consultant model. The feature includes:
- Consult backend (consult.rs) with permission checks
- Call limit (default 5 per session) tracked in State
- Three nudge triggers: before exit_plan, after edits, after 3 failed tools
- Side-panel card showing consultant status and call count
- Config keys: consultant = "<model>" to enable; consultant_max_calls for limit
- All nudges are always on; disable by unsetting the consultant config

The consultant model sees the question and context (passed by itself since the
tool has no context visibility). Token usage counts toward subagent quotas.
2026-11-29 11:23:39 +01:00
johannesandClaude Sonnet 5.5 dfec176f43 feat: add --schema, --max-turns and rpc --ask
build / version (push) Successful in 16s
build / build (aarch64-apple-darwin) (push) Successful in 10m46s
build / build (x86_64-unknown-linux-musl) (push) Successful in 10m45s
build / release (push) Successful in 31s
- hx -p --schema <file> validates the final answer against a JSON schema,
  with one retry that includes the validation errors
- max_turns config key and --max-turns cap the main agent's model calls
- hx --mode rpc --ask sends permission requests to the client instead of
  auto-allowing bash/write/edit calls

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-28 14:15:03 +01:00
johannesandClaude Sonnet 5.5 13d914c8c0 style: fix clippy errors and formatting drift
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-28 14:15:03 +01:00
johannesandClaude Sonnet 5.5 164671a0c5 Subagents: read-only explore, custom agents, background runs, limits
build / version (push) Failing after 6s
build / build (aarch64-apple-darwin) (push) Skipped
build / build (x86_64-unknown-linux-musl) (push) Skipped
build / release (push) Skipped
- explore's bash only runs commands the permit classifier calls read-only
- custom kinds from <hx home>/agents/*.md and .hx/agents/*.md
- task(background=true) + task(wait=[ids]); finished answers handed over at turn end
- answers over 8 KB saved to <session>.sub/NNN-kind.answer.md
- subagent_parallel / subagent_max_turns / subagent_max_tokens / subagent_timeout_secs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-28 00:20:15 +01:00
hermes fd0b0a77dc Abort kills claude_cli process group and cancels pending plan/ask dialogs
- claude -p runs in its own process group; dropping the stream kills the group (its Bash children survived kill_on_drop)
- reader task stops when the stream is dropped
- exit_plan/AskUserQuestion race the question against abort
- TUI clears choose/doc/perm popups when a run ends
- fix abort_during_tool_round test (tu() always built echo calls, slow never ran)
2026-11-25 09:07:38 +00:00
johannes 6048a037ac Merge branch 'worktree-fix-abort-tools'
build / version (push) Successful in 31s
build / build (aarch64-apple-darwin) (push) Successful in 4m45s
build / build (x86_64-unknown-linux-musl) (push) Successful in 4m56s
build / release (push) Successful in 36s
2026-11-21 18:59:04 +01:00
johannesandClaude Sonnet 5.5 8f0de9465d fix: abort stops running tool calls and kills bash process group
Race the tool round against abort, check abort before starting tools,
answer pending calls with an aborted result, deny permission prompts on
abort, and kill the bash process group on drop.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 18:58:42 +01:00
johannesandClaude Sonnet 5.5 2166ef535b feat: card-style status side panel (model, models run, LSP, MCP, tests, session log)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 18:58:37 +01:00
johannesandClaude Haiku 4.5 ec1c4fb41a feat: cursor movement in ask_user free-form input
build / version (push) Successful in 16s
build / build (aarch64-apple-darwin) (push) Successful in 4m9s
build / build (x86_64-unknown-linux-musl) (push) Successful in 4m8s
build / release (push) Successful in 26s
- Replace bare string with Editor in choose.rs typing input
- Support ←/→ (left/right arrow keys) for cursor movement
- Add Home/End, ctrl-a/ctrl-e, Delete, Up/Down between lines
- Keep ctrl-w (kill word), add ctrl-u (kill line)
- Render cursor marker ▏ at actual position in multi-line answers
- Update help text to mention cursor movement
- Add test: type, move cursor, insert character mid-text

Also: delete 4 comment lines from scripts/lint-comments.sh (tautology).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-11-21 13:45:53 +01:00
johannesandClaude Sonnet 5.5 a94632ea3d chore: delete code comments, add ratchet lint and ADRs
Classify every comment as tautology, stale, excuse or decision record.
Tautology/stale/excuse comments are deleted (excuses filed as issues
#196-#236), decisions moved to docs/adr/0001-0034.

- scripts/lint-comments.sh + .comment-baseline: per-file comment count
  may only go down; wired into tests/all.sh
- .claude/skills/delete-comment: repeatable audit workflow
- cargo fmt applied to touched crates

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 13:37:32 +01:00
johannes da31c30fd0 fix: build issues
build / version (push) Successful in 17s
build / build (x86_64-unknown-linux-musl) (push) Successful in 8m28s
build / build (aarch64-apple-darwin) (push) Successful in 8m29s
build / release (push) Successful in 29s
2026-11-18 19:32:56 +01:00
johannesandClaude Sonnet 5.5 0626692591 codemode: images, live inner-call notices, searchTools, store/load, worker cap
build / version (push) Successful in 17s
build / build (x86_64-unknown-linux-musl) (push) Failing after 6m36s
build / build (aarch64-apple-darwin) (push) Failing after 6m47s
build / release (push) Skipped
- ToolResult carries images; agent attaches them after tool results; read returns real images
- inner codemode calls reported as Info notices via State::nested
- searchTools/ALL_TOOLS/describeNamespace, tools.x.json/.raw, exit()
- store()/load() across calls, max_output_tokens, 2-script concurrency cap
- script ends when settled; unawaited calls cancelled; failure lists calls made

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 19:24:56 +01:00
johannesandClaude Sonnet 5.5 9614ac32ab tui: render assistant markdown with pulldown-cmark (tables, lists, quotes, links)
Tables are drawn as box-drawn grids that wrap to the terminal width,
falling back to header: value lists when too narrow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 19:24:56 +01:00
Johannes KresnerandClaude Opus 5.5 b1ca582d6b fix: orchestrated runs honour yolo/auto and work inside the sandbox
- serve --acp applies --yolo / --auto (or `permissions` in config.toml)
  like the TUI; before, every edit and command went to the orchestrator.
- claude no longer asks to run outside the sandbox. With the sandbox on it
  stays confined; only a stored `claude:unsandboxed` rule or
  --no-claude-sandbox lets it out, and yolo never does.
- The sandbox reads the files the global git config includes and may stat
  $HOME and the directories above allowed paths and includeIf gitdir
  paths (metadata only). git died on both before.
- hx mcp-serve logs a failed start to $TMPDIR/hx-mcp-serve.log; claude
  hides its stderr and only reports "mcp__hx__approve not found".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 16:43:41 +01:00
Johannes KresnerandClaude Opus 5.5 800bae97d7 fix: sandboxed claude can read its macOS login from the keychain
The seatbelt profile hides $HOME, and claude_extra did not bring back
~/Library/Keychains. On macOS claude keeps its OAuth login there, so a
sandboxed claude failed with "Not logged in" and the only way out was
to let it run unconfined.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 15:47:25 +01:00
hermes 05165d7b8f Configurable session storage path (sessions_dir, HX_SESSIONS_DIR, optional sessions_host) 2026-11-15 11:09:09 +00:00
hermes b84b6ab23a Gate task subagents behind permission prompt; subagents=false / --no-subagents; description: only when asked 2026-11-14 13:18:27 +00:00
hermes c849463805 Abort reaches all running subagents, incl. background-continued ones 2026-11-14 12:47:10 +00:00
johannesandClaude Sonnet 5.5 aec92ff5a5 hx serve --acp: headless Agent Client Protocol mode
build / version (push) Successful in 13s
build / build (aarch64-apple-darwin) (push) Successful in 6m46s
build / build (x86_64-unknown-linux-musl) (push) Successful in 5m58s
build / release (push) Successful in 28s
JSON-RPC on stdio with permission requests, hx/step|message|interrupt|compact
in and hx/step_result|intent|edit|usage|decision|plan out. Sessions persist by
id. Limits are soft: a limit stop is blocked with reason "limit" and no catch;
catch is only a validated name from the step's catches list.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 13:14:32 +01:00
hermes 79cf5fcda1 agent: abort also ends a hanging request and compaction 2026-11-14 12:00:00 +00:00
hermes e119dc2f0d router: skip tiers whose window cannot hold the history 2026-11-14 11:56:17 +00:00
hermes 5d4cdbf10d plan view: f opens the feedback input directly 2026-11-14 11:36:40 +00:00
hermes 4949a4b558 tui: DocView full-screen scroll view; plan approval opens it instead of printing the plan in chat 2026-11-14 11:36:40 +00:00
hermes fa8641f803 plan mode: pass --permission-mode plan to claude while /plan is on 2026-11-14 11:36:40 +00:00
hermes 8a9d8fe607 plan mode: show full plan before the exit prompt (claude ExitPlanMode via bridge, ask_user path) 2026-11-14 11:36:40 +00:00
hermes 36e99fc8af plan mode: /plan makes bash/write/edit read-only; exit_plan shows the full plan for approval 2026-11-14 11:36:31 +00:00
hermes f1b3ee0607 Merge pull request 'claude_cli: tool calls on the event bus (#182)' (#183) from feat/claude-cli-bus into main
build / version (push) Successful in 11s
build / build (aarch64-apple-darwin) (push) Successful in 6m54s
build / build (x86_64-unknown-linux-musl) (push) Successful in 6m13s
build / release (push) Successful in 29s
2026-11-14 10:42:26 +00:00
hermes ddf8bcd92c claude_cli: hx stats lists claude's tools; unknown permissions value denies in -p 2026-11-14 10:34:49 +00:00
hermes 25936457c9 tui: copy selection joins soft-wrapped rows without newline 2026-11-14 10:14:34 +00:00
hermes 71f05d9a0d claude_cli: ask for every Bash call too (read-only commands bypassed the bridge) 2026-11-14 10:01:49 +00:00
hermes 6978aad27a claude_cli: tool calls on the event bus, extensions can block, permissions deny/extensions-only (#182) 2026-11-13 19:38:29 +00:00
hermes 7218d1433b claude_cli without codemode: serve MCP tools via mcp-serve (mcp__hx__*), prompt names them; skip self-referencing servers 2026-11-13 13:12:20 +00:00
hermes fa0ff339f6 claude_cli+codemode: MCP prompt points at codemode; MCP tools listed first in codemode 2026-11-13 12:38:25 +00:00
hermes e6ac633bf3 Merge pull request 'lens: aborted/bash changes no longer look like user edits' (#180) from fix/abort-attribution into main
build / version (push) Successful in 11s
build / build (aarch64-apple-darwin) (push) Successful in 6m32s
build / build (x86_64-unknown-linux-musl) (push) Successful in 5m32s
build / release (push) Successful in 22s
2026-11-12 20:59:30 +00:00
hermes ed9a9184d0 lens: attribute in-run file changes to the agent, not External; RunEnd event 2026-11-12 20:53:39 +00:00
hermes 02144d4176 permissions: auto mode refuses dangerous calls (rules + cheap-model judge) 2026-11-12 13:44:25 +00:00
hermes c6c4add124 stats: log auto routing per prompt, hx stats routing report 2026-11-10 22:08:55 +00:00
hermes 478c007271 auto: optional Fable tier (/fable), sharper signals, newest model per tier 2026-11-10 21:58:11 +00:00
hermes dc0a329ae1 claude_cli: route AskUserQuestion to hx popup, no permission prompt 2026-11-05 19:27:44 +00:00
johannesandClaude Sonnet 5.5 9843e5305c skills: fall back to line-based frontmatter when YAML is invalid
Descriptions with an unquoted ': ' (e.g. floorplan) failed strict YAML and
the skill was silently dropped. Read single-line known keys instead; skills
with no recognised key are still skipped and reported in /skills.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 23:36:18 +01:00
hermes dac2320503 tui: /reload re-reads AGENTS.md, skills, config, MCP prompt index 2026-11-03 21:21:28 +00:00
johannes ee5d8371d0 ci: add release step
build / version (push) Successful in 6s
build / build (aarch64-apple-darwin) (push) Successful in 5m13s
build / release (push) Canceled after 0s
build / build (x86_64-unknown-linux-musl) (push) Canceled after 2m59s
2026-11-02 15:34:35 +01:00
hermes a0cd7946c3 sandbox: runtime /sandbox toggle, sandbox.claude config, --no-claude-sandbox 2026-11-02 12:28:52 +00:00
hermes 0b97958bd8 tui: live path completion for ~/ / ./ ../ tokens, @~ mentions 2026-11-02 10:58:35 +00:00
hermes b8fc96a3d2 auto model: per-prompt model/effort routing across providers, @override per turn 2026-10-26 21:52:50 +00:00
hermes 19937d0063 tui: ask popup own answer wraps, grows, supports paste/newline/ctrl-w 2026-10-22 19:16:37 +00:00
hermes e05f443e52 claude_cli: map rate_limit_event to Quota (statusbar and /usage) 2026-10-19 13:51:37 +00:00
hermes 28c3d79286 Merge pull request 'tui: yolo while a prompt is running' (#170) from feat/yolo-while-busy into main 2026-10-17 13:54:48 +00:00
hermes 5171e7458a tui: /yolo works while a turn runs; '!' on permission prompt allows and enables yolo 2026-10-17 13:52:39 +00:00