Commit Graph
36 Commits
Author SHA1 Message Date
hermes 45d296d911 Memory: /memory list+forget, /remember, memory counts in hx stats 2026-11-30 12:56:25 +00:00
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
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
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 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
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
hermes 79cf5fcda1 agent: abort also ends a hanging request and compaction 2026-11-14 12:00:00 +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 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 ed9a9184d0 lens: attribute in-run file changes to the agent, not External; RunEnd event 2026-11-12 20:53:39 +00:00
hermes dac2320503 tui: /reload re-reads AGENTS.md, skills, config, MCP prompt index 2026-11-03 21:21:28 +00:00
hermes 841650175f agent: hint after 3 identical consecutive tool calls
Closes #157
2026-10-15 20:37:25 +00:00
hermes a2a38a35bf agent: retry transient API errors (408/429/5xx/529) with backoff
Closes #153
2026-10-15 20:30:24 +00:00
hermes 1a027512e8 agent: retry empty replies once, never store them, then fail visibly 2026-10-12 21:32:45 +00:00
hermes be74dd9fec Session ops and ContextPolicy in hx-core 2026-10-09 19:34:59 +00:00
hermes 63baad33a8 Merge pull request 'herdr support' (#136) from feat/herdr into main 2026-10-06 15:21:34 +00:00
hermes 28dff172f2 Add /btw: side question without tools, not saved, works mid-run 2026-10-06 15:17:57 +00:00
hermes 789ee75a27 herdr support: report idle/working/blocked, resume command, release 2026-10-06 15:15:22 +00:00
hermes ab2af421a4 Thinking levels: Tab cycles off/low/medium/high, /effort 2026-10-06 12:05:29 +00:00
hermes cd52d409b2 Merge main into context-window: mask cap (#117) moves into ContextWindow
ci / check (push) Canceled after 0s
ci / check (pull_request) Canceled after 0s
2026-10-02 15:04:41 +00:00
hermes 8dd6ce833b mask: start masking at min(compact_at/3, 60k) tokens
ci / check (push) Canceled after 0s
ci / check (pull_request) Canceled after 0s
2026-10-02 14:59:18 +00:00
hermes 3070029c9e cargo fmt
ci / check (push) Canceled after 0s
ci / check (pull_request) Canceled after 0s
2026-10-02 14:41:05 +00:00
johannes 8f4b1f1729 Deepen context-window management into ContextWindow
ci / check (push) Canceled after 0s
ci / check (pull_request) Canceled after 0s
Token counting, the compaction trigger and the masking schedule lived in
Agent's private fields plus mask.rs, compact.rs, stats.rs and the TUI.
Move them behind one module with view/record/reset/tokens, so the
reset-together invariant and the mask-boundary rule have one owner.

- Agent holds a ContextWindow instead of compact_at/ctx/mask_boundary
- TUI shows Agent::context_tokens() (real reading + estimate), matching
  the compaction trigger instead of the bytes/4 guess
- stats replay goes through ContextWindow::masked
- ContextMeter/estimate_tokens move into the module; mask is crate-private
- tests at the ContextWindow interface replace the meter unit test
2026-10-02 16:36:50 +02:00
hermes 359a5058d7 Subagents: task tool (explore on cheap model, general), child sessions, usage roll-up, stats
ci / check (pull_request) Canceled after 0s
ci / check (push) Canceled after 0s
2026-10-02 11:57:59 +00:00
hermes c74b45cbeb mask: boundary kept in Agent, advances only when context > compact_at/3; recorded per request, stats replays it
ci / check (pull_request) Canceled after 0s
ci / check (push) Canceled after 0s
2026-10-01 22:35:47 +00:00
johannes eaa6e22fbd Deepen Agent, compaction, switching and TUI modules
ci / check (push) Canceled after 0s
ci / check (pull_request) Canceled after 0s
- Agent: make session/usage/provider/model/system/max_tokens/compact_at
  private; add set_provider, set_model, replace_session, fork, clear,
  fit_window. Fixes stale context-token reading after resume/new session.
- hx-core::compact: ContextMeter, plan/apply and estimate_tokens split out
  of agent.rs, testable without provider or session.
- hx-core::switch: Switcher shared by TUI and RPC for model/provider
  switches; RPC set_model now also refits the compaction threshold.
- hx-tui: status.rs (footer, /usage as pure functions), popup.rs, and
  Picker::key returning an Act.
- tests/tui_smoke.py: resolve the temp dir (macOS /var symlink) and match
  the resume via the OSC window title instead of split screen text.
2026-10-02 00:10:41 +02:00
hermes 80c0f83a68 tokens: mask old large tool results in requests; compact inside a single long tool loop
ci / check (pull_request) Canceled after 0s
ci / check (push) Canceled after 0s
2026-10-01 21:45:17 +00:00
hermes c5420026b8 tokens: rolling cache breakpoints, real-usage compact trigger, smaller read/bash limits with head+tail
ci / check (pull_request) Canceled after 0s
ci / check (push) Canceled after 0s
2026-10-01 21:00:47 +00:00
hermes 1c69c8ed34 stats: log per-request usage in session, add 'hx stats <session>' token report
ci / check (pull_request) Canceled after 0s
ci / check (push) Canceled after 0s
2026-10-01 20:52:42 +00:00
hermes 23eb00d920 M10: /new, session listing, /sessions picker, hx -r, session titles, rpc session ops
ci / check (push) Canceled after 0s
ci / check (pull_request) Canceled after 0s
Closes #86, closes #87, closes #88, closes #89, closes #90, closes #91
2026-10-01 09:35:47 +00:00
hermes d7aeaf0bb9 M9: lens block, ctrl-p picker, /resume, wide side panel
ci / check (push) Canceled after 0s
ci / check (pull_request) Canceled after 0s
Closes #78, closes #82, closes #83
2026-10-01 09:16:59 +00:00
hermes 65765ce2b3 M8: command registry, skills as slash commands, completion engine + popup, rpc complete
ci / check (push) Canceled after 0s
ci / check (pull_request) Canceled after 0s
Closes #68, closes #69, closes #70, closes #71, closes #72
2026-09-30 22:05:04 +00:00
hermes a01d0cbb5b M7: json + rpc modes, subprocess extensions (closes #52 #53 #54)
ci / check (pull_request) Canceled after 0s
ci / check (push) Canceled after 0s
2026-09-30 21:40:20 +00:00
hermes 89c9833e43 M2: interactive TUI, config, model switching, compaction
ci / check (push) Canceled after 0s
- hx-tui: ratatui app with streaming transcript, markdown-ish rendering, tool call status,
  colored edit diffs, collapsible bash/read output (ctrl-o), scrollback, spinner + footer (provider, model, ctx, tokens)
- editor: multi-line, history, word/line kill, bracketed paste, @file fuzzy tab completion; mentioned files attached
- message queue while agent runs; esc/ctrl-c abort; /model /provider /compact /clear /help /quit; resumed history shown
- hx-core: compaction (summarize older prompts, keep recent verbatim, session rebase keeps full file history),
  auto-compact at threshold; abort only ends current run
- config: ~/.hx/config.toml + project .hx/config.toml (provider, per-provider models, compact_at, max_tokens, system_prompt)
- API-equivalent cost estimate in exit summary
- tests/tui_smoke.py drives the real TUI in a pty against the fake API

Closes #15, closes #16, closes #17, closes #18, closes #19
2026-09-30 10:37:56 +00:00
hermes 21d4d2bb3d M1: agent loop, tools, sessions, context, skills
ci / check (push) Canceled after 0s
- hx-core: Tool trait + registry (schema validation, parallel calls), event bus with Block/Mutate/Inject hooks,
  agent loop (abort, max turns, AgentEnd inject), JSONL session tree (fork, resume, torn-line tolerant),
  AGENTS.md/CLAUDE.md hierarchy, skills index (bodies on demand)
- hx-tools: read (ranges, binary, images, caps), write/edit (exact match, ambiguity, CRLF, diff, read-guard), bash (merged output, timeout kills process group, tail truncation to temp file)
- hx-cli: -p runs full agent loop, --session / --continue, Ctrl-C abort, HX_BASE_URL override
- tests/e2e.sh: scripted fake Anthropic server drives write -> bash -> answer

Closes #6, closes #7, closes #8, closes #9, closes #10, closes #11, closes #12, closes #13, closes #14
2026-09-30 09:36:16 +00:00