[Merge after #12] Thought signatures for gemini need to be passed back to support multistep - #13
[Merge after #12] Thought signatures for gemini need to be passed back to support multistep#13hjc-puro wants to merge 7 commits into
Conversation
🔍 자동 분석 결과이슈 요약투표 미션 시스템 — 일일/주간 미션을 제공하여 사용자 목표 유도 + 보상 지급 기술 구현 고려사항백엔드 (Phoenix/Ash)
iOS (SwiftUI)
우선순위 제안
관련existing 코드
🤖 HanNyang Auto Resolver |
…on export, pinned sessions, context meter Ported from ibelick/webclaw PRs NousResearch#24, #10, NousResearch#14, NousResearch#13: - Command palette (⌘K): search and switch sessions instantly - Conversation export: download as Markdown, JSON, or Plain Text - Pinned sessions: pin/unpin from context menu, shown at top of sidebar - Context meter: token usage ring in chat header with hover details - Keyboard shortcuts: ⌘K search, ⌘⇧O new session New UI primitives: autocomplete, command, input, preview-card Attachment button/preview components (composer already has built-in support)
…ase in finally block' (NousResearch#13) from fix/delegate-credential-lease-leak into main
- safe_print: strip rich markup tags when rich is unavailable so plain fallback output doesn't leak literal '[bold red]...[/bold red]' tags - profiling.aggregate_profiling_stats: stop reconstructing per-call timings by repeating the mean (statistically wrong; gave incorrect min/max/median across workers). Combine summary stats directly and flag median as approximate via median_time_approximate - run_agent: hoist 'reset_profiler' import to module level; drop noisy 'dir(tc)' / 'model_dump()' debug logging spam from the verbose path - batch_runner: drop unused 'import re'; replace bare 'except:' with specific (JSONDecodeError, TypeError, AttributeError) and guard isinstance(content, str) before calling .strip() - tools/simple_terminal_tool: replace bare 'except:' with 'except Exception' on the SSH-context cleanup paths Amp-Thread-ID: https://ampcode.com/threads/T-019dce4d-5fc2-703c-b2e4-b8a87ec42105 Co-authored-by: Amp <amp@ampcode.com>
🔍 Code Review for PR #13Issues found1. 2. aggregated["tools"][tool_name]["times"].extend(
[tool_stats.get("mean_time", 0.0)] * tool_stats.get("call_count", 0)
)Reconstructing per-call timings by repeating the mean N times yields incorrect 3.
4.
5. ResolutionFixes pushed in commit Verified: all 5 files compile cleanly, and a regression test against |
Per P0-C spike decision (c), formalize aiseo_cli.py sync as a permanent fork-only asset. ADR-001 captures Context (5 BLOCKING gaps in upstream), Decision (don't refactor to delegate), Consequences (re-evaluation triggers + quarterly review), and Status. Adds 3 protection tests guarding the BLOCKING gaps that justify (c): - gap NousResearch#3: rolling backup pruning keeps newest 5 by timestamp - gap NousResearch#7: text-level yaml migration preserves all comments + blanks - gap NousResearch#13: _migrate_profile_config calls os.fsync on tmp file CLAUDE.md, NEXT_STEPS.md and seeds README all link back to ADR-001 + spike doc for traceability and quarterly re-evaluation cadence.
- 5/25·5/26 wvb-daily-brief-kst0700 cron 연속 Gemini HTTP 429 (paid Tier 1 1M TPM 초과). v2.5 신설 시 명시한 "429 risk 약간 상승 감수"가 실제 발생. - config.yaml ms365 preset: "mail,files" → "mail" (5/16 안정 복귀) - SKILL.md Step 5 임시 OFF 마킹, Output Format OneDrive 줄 교체, Verification NousResearch#13 strikethrough - 재활성화 조건: (1) Gemini Tier 2 upgrade, OR (2) SKILL.md trim (21K → 8-10K bytes) 후 토큰 여유 확인 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Path.expanduser() raises RuntimeError 'Could not determine home directory' for an unresolvable ~user token (e.g. a terminal command referencing ~someuser that doesn't exist, or ~ with HOME unset). Two hot-path call sites caught only (OSError, ValueError), so the RuntimeError escaped and crashed entire agent turns. Observed live 2026-06-20 in the SysDesign evolve cron (API call NousResearch#13, 'Outer loop error') — the whole turn died on a single best-effort path hint. Fixes (both purely advisory/best-effort, must never be fatal): - subdirectory_hints._add_path_candidate: add RuntimeError to the except clause. AGENTS.md hint discovery skips an unresolvable candidate instead of raising. - tool_dispatch_helpers._extract_parallel_scope_path: wrap expanduser() in try/except returning None — caller then falls back to SEQUENTIAL execution (the safe default) instead of crashing the dispatch path. Fleet-wide impact: every profile + cron was vulnerable to a ~baduser token in any tool call. Regression tests added to both modules (reproduce the exact crash via terminal command + path-scoped arg). 56 tests pass, ruff clean. Takes effect on next gateway restart (not hot-reloaded).
…ed skills Review rec NousResearch#13 (data-loss item): these were live in the working tree but uncommitted/unbacked-up — they vanish on any checkout/upgrade. Contents: constitution-injection wiring (cognitive_processor.py, prompt_builder.py), daily_summary_facts.py (deferred-asks), file_operations.py (include_ignored), athena_telegram_proxy, cron/jobs.json, SOUL.md, and Athena's self-authored skills (self-audit-cognitive-autonomy, verify-substrate-before-action) + refs. All Python files syntax-checked clean. Backs up to the `personal` fork only — never pushed to nousresearch upstream. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Path.expanduser() raises RuntimeError 'Could not determine home directory' for an unresolvable ~user token (e.g. a terminal command referencing ~someuser that doesn't exist, or ~ with HOME unset). Two hot-path call sites caught only (OSError, ValueError), so the RuntimeError escaped and crashed entire agent turns. Observed live 2026-06-20 in the SysDesign evolve cron (API call NousResearch#13, 'Outer loop error') — the whole turn died on a single best-effort path hint. Fixes (both purely advisory/best-effort, must never be fatal): - subdirectory_hints._add_path_candidate: add RuntimeError to the except clause. AGENTS.md hint discovery skips an unresolvable candidate instead of raising. - tool_dispatch_helpers._extract_parallel_scope_path: wrap expanduser() in try/except returning None — caller then falls back to SEQUENTIAL execution (the safe default) instead of crashing the dispatch path. Fleet-wide impact: every profile + cron was vulnerable to a ~baduser token in any tool call. Regression tests added to both modules (reproduce the exact crash via terminal command + path-scoped arg). 56 tests pass, ruff clean. Takes effect on next gateway restart (not hot-reloaded).
Path.expanduser() raises RuntimeError 'Could not determine home directory' for an unresolvable ~user token (e.g. a terminal command referencing ~someuser that doesn't exist, or ~ with HOME unset). Two hot-path call sites caught only (OSError, ValueError), so the RuntimeError escaped and crashed entire agent turns. Observed live 2026-06-20 in the SysDesign evolve cron (API call NousResearch#13, 'Outer loop error') — the whole turn died on a single best-effort path hint. Fixes (both purely advisory/best-effort, must never be fatal): - subdirectory_hints._add_path_candidate: add RuntimeError to the except clause. AGENTS.md hint discovery skips an unresolvable candidate instead of raising. - tool_dispatch_helpers._extract_parallel_scope_path: wrap expanduser() in try/except returning None — caller then falls back to SEQUENTIAL execution (the safe default) instead of crashing the dispatch path. Fleet-wide impact: every profile + cron was vulnerable to a ~baduser token in any tool call. Regression tests added to both modules (reproduce the exact crash via terminal command + path-scoped arg). 56 tests pass, ruff clean. Takes effect on next gateway restart (not hot-reloaded).
When agent.max_tools_per_turn trips and build_api_kwargs withholds tools, an enforcement-prompted local reasoning model (observed live: ornith 35B, lmstudio api_mode) whose STATIC system prompt still commands it to always use tools returns an EMPTY response — no content, no reasoning. The empty-response retry runs 3x on identical input and the turn dies reason=empty_response_exhausted with no final answer delivered: API call NousResearch#13: ... in=28847 out=95 latency=17.6s Empty response (no content or reasoning) after 3 retries. Turn ended: reason=empty_response_exhausted ... api_calls=13/30 On the FIRST budget-tripped completion call of a turn, append a single system-channel note telling the model tools are gone for the rest of the turn and a plain-text final answer is expected. Injected at the build_api_kwargs tools-withhold choke point — the same layer as the tools gate — so it reaches every api_mode with no per-transport duplication. System role, never a synthetic user message mid-loop (AGENTS.md). A per-turn latch (_tool_budget_wrapup_injected), reset alongside _tools_dispatched_this_turn at turn start, fires it exactly once: network retries reusing the same api_messages list and empty-response retries that rebuild it never duplicate the note. No-op when the budget is off (byte-identical, zero new messages). Anthropic takes a single system param and its adapter was last-writer-wins, so a trailing system note would clobber the byte-stable primary prompt. Make convert_messages_to_anthropic ACCUMULATE additional system messages (mirroring the Bedrock adapter's append and Gemini's join); byte-identical for the single-system-message case. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NP1MdSdZXeYWX2meR6fZo2
The rank lookup only contained projected *tip* ids, but FTS5 search hits roots and mid-chain sessions just as often (old messages match). Those resolved to None and silently fell back to the sequential result index — producing the mixed garbage the user saw (4, 80, 3, 4, 262, 6, 7 with duplicate 4s and impossible small numbers). Now session_rank() walks forward along continuation children (latest started_at first, max 20 hops) until it finds an id in the projected rank map — every chain's live tip is in the map — and returns that chain's position. Result for 'search tmux' is now 4, 80, 44, 80, 262, 303, 552: all real positions in # Title Model Tok Created Last Preview ID ── ───────────────────────────────────────────────── ────────── ────────── ────────── ──────── ──────────────────────────────────────── ──────────────────────── 1 — deepseek-… 0/0 2026-07-31 4h 20260731_071846_9fa701 2 — deepseek-… 30k/8k 2026-07-31 4h can you fix copy selected to clipboar… 20260731_065709_d308d6 3 fintwit-daily-fetch · Jul 31 06:07 deepseek-… 28k/412 2026-07-31 5h [IMPORTANT: You are running as a sche… cron_9223b2202bd2_20260731_060057 4 Tmux config and scripts review summary deepseek-… 99k/69k 2026-07-31 4h review .tmux config and scripts in .l… 20260731_055644_5e1c37 5 — deepseek-… 30k/10k 2026-07-31 6h is there a way to open all folders in… 20260731_052757_d3bd37 6 Managing Personal Hermes Skills Organization deepseek-… 188k/54k 2026-07-31 7h I realiezd that I need to keep my per… 20260731_030112_fd9939 7 Search sessions for data collector deepseek-… 64k/1k 2026-07-31 9h sessions search data-collector 20260731_014020_1bec3c 8 Update Plan Skill with Discovery Phase deepseek-… 52k/24k 2026-07-31 9h [User attached file: /home/shiro/.her… 20260731_012537_aa571d 9 Search Hermes browser iMac socat session deepseek-… 117k/44k 2026-07-31 9h search session where we worked on /br… 20260731_004120_67edd7 10 Hermes CLI Sessions and Resume Commands NousResearch#13 deepseek-… 121k/56k 2026-07-31 2s [CONTEXT COMPACTION — REFERENCE ONLY]… 20260731_113524_142504 11 Linking iMac Chrome to opencode browser deepseek-… 277k/20k 2026-07-31 7h I want to give opencode the same brow… 20260731_000128_f44ad5 12 Improving Hermes Agent Codebase Access Beyond RAG deepseek-… 72k/18k 2026-07-31 11h Looking to improve hermes agent, trie… 20260730_234830_1a2cdd 13 Add oh-my-openagent docs to qmd collection deepseek-… 108k/40k 2026-07-30 11h can you add oh my openagents docs in … 20260730_232541_0a40bc 14 fintwit-daily-fetch · Jul 30 06:04 deepseek-… 28k/358 2026-07-30 1d [IMPORTANT: You are running as a sche… cron_9223b2202bd2_20260730_060042 15 Monid setup requires API key deepseek-… 35k/6k 2026-07-29 1d set up https://monid.ai/SKILL.md 20260729_230009_5f48fd 16 Quick storage cleanup with approval deepseek-… 45k/15k 2026-07-29 1d find quick way to free storage space,… 20260729_215349_39b397 17 Phone SSH Fix and Termux Venv Setup deepseek-… 95k/39k 2026-07-29 1d help me fix my phone tmux launcher. s… 20260729_205759_70586e 18 Config file fixes for opencode deepseek-… 71k/26k 2026-07-29 1d can you fix @file:opencode.json and @… 20260729_181012_522948 19 Setup FaceSwap Google Colab Notebook deepseek-… 55k/6k 2026-07-29 1d @file:README.md I want to test this t… 20260729_163129_b94fe9 20 Fix Discover Offline Cloudflare Repo Error deepseek-… 41k/5k 2026-07-29 1d trying to update my apps in Updates -… 20260729_065842_ee8947, with the root/tip pair of one chain correctly sharing its slot (80). Rank window raised 500 -> 2000 so the whole store is covered (569 projected rows today). Tests: 95 pass.
…In/Out) The dedup only dropped ancestors that were directly in the FTS5 result set. When intermediate generations were missing (search matched only e.g. NousResearch#7 and NousResearch#13), the walk stopped and both children were listed twice. Now every result is grouped by its deepest compression ancestor (backward walk across compression edges only — branch children stop the walk so distinct conversations are never collapsed) and the newest descendant wins, so one conversation = one row regardless of which generations matched. Uses a backward-only walk instead of get_compression_lineage, whose forward walk assumes a linear chain and fragments on divergent children (seen in the 'Script unique pwd' chain). Also renames the token column header from 'Tok' to 'Tok(In/Out)' (input/output) per request. Tests: 95 pass.
Findings #1 and NousResearch#2, together, because NousResearch#2 makes #1 bypassable: a gate in the model-tools path is worth nothing while `registry.dispatch()` reaches handlers without consulting it. `resolve()` now has a production caller. A non-AUTO tool cannot execute without an execution capability, and a capability cannot exist without a decision — not "approved" as a boolean somebody might set early, but a token minted at consent, bound to the exact call, and destroyed by being used. Four properties, each with a test that fails without it. Bound to the tool and an argument fingerprint, so approving one call cannot execute a different one and mutating arguments between consent and execution invalidates the token. One-use, so a retry loop cannot turn one approval into several executions. Short-lived, because consent goes stale. And `consume()` raises rather than returning a boolean — a caller that forgets to check a boolean executes anyway, and this is the one check where forgetting must not be survivable. Fail-closed throughout. A broken permission lookup refuses; `requires_capability` returns True on any exception; an unreadable trust list trusts nothing; minting without a `tool_call_id` is refused outright, because a capability that could match any call is not a capability. Every refusal test asserts the handler ran **zero** times — a gate that refuses after the side effect is not a gate. **The default is `observe`, and that is a gap rather than a preference.** `get_tier()` returns ALWAYS_APPROVAL for unregistered tools — deliberately, so an unknown tool is never assumed safe — and most tools here were never registered. Switching straight to `enforce` would refuse nearly every call in the product, which is an outage, not a safety improvement. `observe` audits every call that *would* be refused, with its tool name, so the registration backlog is measurable against real traffic and the switch can be flipped once the audit goes quiet. This mirrors HERMES_APPROVAL_INTEGRITY_MODE, which exists for the same reason; both must reach `enforce` for the tier system to mean anything, and neither is there yet. Enforce mode is fully tested. Also corrected, per the review: the baseline-failure classification, which I had called environmental wholesale. Three of them are real defects at baseline — `atomic_config_write` NameErrors, a SQLite journal-mode assertion, and a jobs asset-contract failure — and the evidence now says so per failure. And the rollback procedure, which claimed one merge revert covered a many-commit range; it now gives a non-destructive runtime pin plus three repository options, with the history-rewriting one marked as needing explicit approval. Regression check: tests/tools 8532 passed / 19 failed — the failing set byte-identical to baseline, so the gate broke nothing. Still not merged to main. Remaining findings: NousResearch#6 undo wiring, NousResearch#10 Now composition, NousResearch#11 native resume, NousResearch#12 New Chat, NousResearch#13 free-form clarify, NousResearch#14 approval acknowledgement, NousResearch#15 reconnect, NousResearch#16 readiness coupling, NousResearch#17 sensor delivery. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nu2Qaq5Y7EScuooGz8co34
Remediation for review findingsNew branch
Awaiting new exact-SHA CI evidence. |
No description provided.