Repository navigation
fix: delegated runs no longer hang; route workspace questions; real agent and command names (1.1.0) - #7
Conversation
…gent and command names (1.1.0)
Found by running the plugin end to end in Claude Code 2.1.300 against a linked
Altimate workspace:
- Every delegation hung: Claude Code's Bash tool leaves stdin open and
`altimate-code run` reads piped stdin to EOF. Invocations now redirect stdin
from `/dev/null`.
- `--agent fast-edit` does not exist in altimate-code; every run fell back to
`builder` with a warning. Runs ask for `builder`, which also has the workspace
skills and memory tools (`analyst` failed to load workspace skills in testing).
- `mktemp -t altimate-result.XXXXXX.md` left literal `X`s on macOS; use
`mktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX"`.
- Questions about the team's own conventions, standards and knowledge did not
reach altimate-code, so a linked workspace's skills and memory were never
consulted. The skill description, SessionStart context and `/altimate-code:altimate`
now cover them, and say how to check the link, sign in and link.
- Docs say `/altimate-code:altimate`: Claude Code namespaces plugin commands and
answers "Unknown command" to a bare `/altimate`. READMEs add the
plugin-directory install command and an "Use an Altimate workspace" section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011chv9Rmu7jQXokum1WNcs7
| )" | ||
| umask 077 | ||
| OUTPUT_FILE="$(mktemp -t altimate-result.XXXXXX.md)" | ||
| OUTPUT_FILE="$(mktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX")" |
There was a problem hiding this comment.
WARNING: TMPDIR commonly has a trailing slash on macOS (e.g. /var/folders/.../T/), so ${TMPDIR:-/tmp}/altimate-result.XXXXXX expands with a double slash (//altimate-result...). Strip any trailing slash with ${TMPDIR%/} so the path is normalized.
| OUTPUT_FILE="$(mktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX")" | |
| OUTPUT_FILE="$(mktemp "${TMPDIR%/:-/tmp}/altimate-result.XXXXXX")" |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
There was a problem hiding this comment.
Not changing this. A double slash in a path is harmless on macOS and Linux; delegated runs in testing wrote to …/T//altimate-result.XXXX fine. The suggested ${TMPDIR%/:-/tmp} is also not valid parameter expansion.
| )" | ||
| umask 077 | ||
| OUTPUT_FILE="$(mktemp -t altimate-result.XXXXXX.md)" | ||
| OUTPUT_FILE="$(mktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX")" |
There was a problem hiding this comment.
WARNING: Strip any trailing slash on TMPDIR (common on macOS) to avoid a double slash in the generated temp file path.
| OUTPUT_FILE="$(mktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX")" | |
| OUTPUT_FILE="$(mktemp "${TMPDIR%/:-/tmp}/altimate-result.XXXXXX")" |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
There was a problem hiding this comment.
Same as the first TMPDIR thread: not changing this. The double slash is harmless, and the suggested expansion is not valid.
| )" | ||
| umask 077 | ||
| OUTPUT_FILE="$(mktemp -t altimate-result.XXXXXX.md)" | ||
| OUTPUT_FILE="$(mktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX")" |
There was a problem hiding this comment.
WARNING: TMPDIR commonly has a trailing slash on macOS (e.g. /var/folders/.../T/), so ${TMPDIR:-/tmp}/altimate-result.XXXXXX produces a double slash. Strip any trailing slash with ${TMPDIR%/}.
| OUTPUT_FILE="$(mktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX")" | |
| OUTPUT_FILE="$(mktemp "${TMPDIR%/:-/tmp}/altimate-result.XXXXXX")" |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
There was a problem hiding this comment.
Same as the first TMPDIR thread: not changing this. The double slash is harmless, and the suggested expansion is not valid.
| )" | ||
| umask 077 | ||
| OUTPUT_FILE="$(mktemp -t altimate-result.XXXXXX.md)" | ||
| OUTPUT_FILE="$(mktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX")" |
There was a problem hiding this comment.
WARNING: Strip any trailing slash on TMPDIR (common on macOS) to avoid a double slash in the generated temp file path.
| OUTPUT_FILE="$(mktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX")" | |
| OUTPUT_FILE="$(mktemp "${TMPDIR%/:-/tmp}/altimate-result.XXXXXX")" |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
There was a problem hiding this comment.
Same as the first TMPDIR thread: not changing this. The double slash is harmless, and the suggested expansion is not valid.
| - **Skill** — `plugins/altimate-code/skills/altimate-code/SKILL.md` — the delegation logic (`altimate-code run "$USER_TASK"` and surface the result). | ||
| - **Hook** — `plugins/altimate-code/hooks/hooks.json` + `plugins/altimate-code/hooks-handlers/session-start.sh` — SessionStart hook that describes the plugin's capabilities in the system prompt so Claude can route to it when the task shape fits. | ||
| - **Command** — `plugins/altimate-code/commands/altimate.md` — `/altimate` slash command for explicit delegation with agent-persona selection. | ||
| - **Command** — `plugins/altimate-code/commands/altimate.md` — `/altimate-code:altimate` slash command for explicit delegation with agent-persona selection. |
There was a problem hiding this comment.
SUGGESTION: Update this component description — the PR removes agent-persona selection (fast-edit / analyst / builder) in favor of always invoking --agent builder.
| - **Command** — `plugins/altimate-code/commands/altimate.md` — `/altimate-code:altimate` slash command for explicit delegation with agent-persona selection. | |
| - **Command** — `plugins/altimate-code/commands/altimate.md` — `/altimate-code:altimate` slash command for explicit delegation. |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
|
|
||
| ## Components | ||
|
|
||
| - **Skill** — `skills/altimate-code/SKILL.md` — delegation logic and agent-persona selection |
There was a problem hiding this comment.
SUGGESTION: skills/altimate-code/SKILL.md no longer performs agent-persona selection after this PR (it always uses --agent builder). Consider updating this bullet to stay consistent with the rest of the docs.
| - **Skill** — `skills/altimate-code/SKILL.md` — delegation logic and agent-persona selection | |
| - **Skill** — `skills/altimate-code/SKILL.md` — delegation logic and workspace guidance |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (10 files)
Previous Review Summaries (4 snapshots, latest commit 033a2ee)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 033a2ee)Status: No Issues Found | Recommendation: Merge Files Reviewed (9 files)
Previous review (commit bebecf5)Status: 4 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (9 files)
Fix these issues in Kilo Cloud Previous review (commit 13af34b)Status: 7 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (9 files)
Fix these issues in Kilo Cloud Previous review (commit b2a6bf8)Status: 6 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (9 files)
Reviewed by gemini-4-argon · Input: 61.1K · Output: 1.6K · Cached: 137.1K |
Tested in an interactive Claude Code session: the advice to run `! altimate-code link` failed (its picker needs a TTY, and `!` gives none), and `! altimate-code auth login -p altimate-backend` waits at a method picker nobody can answer. - Sign-in advice adds `--method "Altimate LLM Gateway"` (supported by released altimate-code), which skips the picker. - Linking: the skill lists workspaces with `altimate-code workspace list`, lets the user choose, and runs `link --workspace`, or `link --create` for a new one. Falls back to asking for the name, or `altimate-code link` in a separate terminal, on a CLI without `workspace list`. - README and CHANGELOG to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011chv9Rmu7jQXokum1WNcs7
| |---|---| | ||
| | `command not found: altimate-code` | "altimate-code is not installed. Install with `npm install -g altimate-code` (Node 20+) and run `altimate-code` once to configure auth. Then re-run your request." | | ||
| | `Unauthorized: Incorrect auth token` / `No provider configured` | "altimate-code's LLM provider auth is misconfigured. Run `altimate-code` in your terminal to open the TUI and reconfigure your provider, then re-run your request." | | ||
| | `Unauthorized: Incorrect auth token` / `No provider configured` | "altimate-code's LLM provider auth is misconfigured. Run `altimate-code` in your terminal to open the TUI and reconfigure your provider, or sign in to Altimate with `altimate-code auth login -p altimate-backend`, then re-run your request." | |
There was a problem hiding this comment.
SUGGESTION: Add --method "Altimate LLM Gateway" here to match the updated sign-in command on lines 105 and 119 (and in README.md), so users who run it from Claude Code via ! don't get stuck at the interactive method picker.
| | `Unauthorized: Incorrect auth token` / `No provider configured` | "altimate-code's LLM provider auth is misconfigured. Run `altimate-code` in your terminal to open the TUI and reconfigure your provider, or sign in to Altimate with `altimate-code auth login -p altimate-backend`, then re-run your request." | | |
| | `Unauthorized: Incorrect auth token` / `No provider configured` | "altimate-code's LLM provider auth is misconfigured. Run `altimate-code` in your terminal to open the TUI and reconfigure your provider, or sign in to Altimate with `altimate-code auth login -p altimate-backend --method "Altimate LLM Gateway"`, then re-run your request." | |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Review follow-ups: the skill and command no longer choose an agent, and the provider-auth failure row now prints the sign-in command that works from Claude Code's `!` prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011chv9Rmu7jQXokum1WNcs7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011chv9Rmu7jQXokum1WNcs7
sahrizvi
left a comment
There was a problem hiding this comment.
Multi-model consensus review (5 models). One MAJOR finding is inline below. Minor issues and nits are in a separate PR comment.
|
|
||
| If the project is linked to an Altimate workspace, altimate-code uses its skills, knowledge and memory automatically. There is nothing to pass. | ||
|
|
||
| 4. **Surface the result verbatim:** read `"$OUTPUT_FILE"` and present its contents to the user without re-summarising, re-formatting, or commenting. altimate-code has already produced the answer. Delete `"$OUTPUT_FILE"` after presenting so warehouse rows, lineage, or PII findings don't linger on disk. |
There was a problem hiding this comment.
[MAJOR] The command path drops the unsent-memory notice.
The PR says that both the skill and the command pass on the CLI's "not in the workspace yet" line, but only SKILL.md:120 does. This step says to present only $OUTPUT_FILE, verbatim and "without commenting". Step 5 points to the skill's failure table only "on any altimate-code error". The notice is not an error, and altimate-code#1552 writes it to stderr (process.stderr.write), not to the --output file. So on /altimate-code:altimate, the path the README recommends for workspace questions and the one used to test "remember this rule", the user is never told that their memory stayed on this machine.
Suggested fix: add to step 4:
If the run's stderr contains
not in the workspace yetorCould not confirm that the memory saved here reached the workspace, present the result, then add the matching notice from the skill's failure-modes table.
Consensus: found by one reviewer; all five endorsed it in convergence.
There was a problem hiding this comment.
Fixed in 6d26f1e. Step 4 now says to add the matching note from the failure-modes table when stderr says not in the workspace yet or Could not confirm….
Consensus review: minor issues, nits, and notes off the diffFive models reviewed this PR independently, then converged in one round. Verdict: request changes (light). The one MAJOR finding (the command path drops the stderr unsent-memory notice) is posted inline. Checked against altimate-code
Minor
Nits
Unintended consequences (not tied to a diff line)
What's good
Reviewed by Claude, GPT 5.3 Codex, Grok 4.3, Qwen 3.6 Plus and DeepSeek V4 Pro. Converged in one round. |
- `/altimate-code:altimate` passes on altimate-code's unsent-memory notice, which the CLI writes to stderr, not the output file. - "Could not confirm…" maps to `workspace status`, not `workspace sync`. - `workspace status` exit codes: 0 linked, 3 not linked, 2 with "Not signed in" means sign in; anything else shows the CLI's message. - `link --create` on a name already taken: offer `--workspace`, or `--allow-duplicate` once the user confirms. - README: quote `<id or name>`, re-link needs `--yes`, older CLIs have no `workspace list`. - Marketplace entry: description and version match plugin.json (1.1.0). - CHANGELOG scopes the stdin redirect to `run`; no nested double quotes in verbatim messages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011chv9Rmu7jQXokum1WNcs7
|
Consensus review follow-ups, in 6d26f1e:
|
hkaltai
left a comment
There was a problem hiding this comment.
Peer review (lead plus an independent second reviewer, converged in one round).
Verdict: changes requested. One MAJOR and three MINOR findings, posted inline. The stdin < /dev/null fix, --agent builder, the workspace status exit codes (0/2/3), link --create/--allow-duplicate/--yes and auth login --method all match the altimate-code source. The SessionStart hook still emits valid JSON, both manifests are at 1.1.0, and claude plugin validate passes.
Cross-checks: scope could not be verified because no ticket is linked (consider linking one) · unrelated files: clean · comment hygiene: clean · naming: clean.
|
|
||
| - **Check the link:** `altimate-code workspace status < /dev/null`. Exit code 0 means linked and 3 means not linked. Exit code 2 with `Not signed in to Altimate` means the user must sign in. For anything else, show the user the CLI's message. | ||
| - **Not signed in:** tell the user to run `! altimate-code auth login -p altimate-backend --method "Altimate LLM Gateway"` in this session. It opens their browser to sign in. Do not try to sign in for them. Keep the `--method` flag: without it the command waits at a menu that cannot be answered from this session. | ||
| - **Not linked:** do not suggest `! altimate-code link`: its picker needs a terminal, and this session does not give it one. Instead run `altimate-code workspace list < /dev/null`, show the user the workspaces it prints, and once they choose, run `altimate-code link --workspace "<id or name>" < /dev/null`. If they want a new workspace, run `altimate-code link --create < /dev/null`, which names it after the repository. If a workspace with that name already exists, `--create` refuses and names it: offer to link to that one with `--workspace`, or, if the user confirms they want a second one, re-run with `--allow-duplicate`. If the project is already linked to a different workspace, `link` refuses; confirm the move with the user, then re-run it with `--yes`. If `workspace list` is an unknown command (an older altimate-code), ask the user for the workspace's name, or tell them to run `altimate-code link` in a separate terminal. |
There was a problem hiding this comment.
MAJOR · security: link --workspace "<id or name>" puts a workspace name, which comes from the service, inside double quotes. Double quotes still expand $(...) and backticks, so a workspace named something like demo$(cmd) runs cmd when Claude builds this command, and the CLI receives the name demo. The task text already goes through a quoted here-doc for exactly this reason, so this path should get the same treatment.
Suggestion: link by the workspace ID from workspace list, not the name, and pass it through a quoted here-doc variable like TASK:
WS="$(cat <<'ALTIMATE_WS'
<workspace id>
ALTIMATE_WS
)"
altimate-code link --workspace "$WS" < /dev/nullWrapping it in single quotes is not enough by itself, because a name can contain an apostrophe. The same applies to the older-CLI name fallback on this line and to plugins/altimate-code/README.md:47.
There was a problem hiding this comment.
This should be Nit as command is already executing on the user machine. if user wants then he can directly do this without plugin. In reality, this doesn't add any extra security at all.
| | `Unauthorized: Incorrect auth token` / `No provider configured` | "altimate-code's LLM provider auth is misconfigured. Run `altimate-code` in your terminal to open the TUI and reconfigure your provider, then re-run your request." | | ||
| | `Unauthorized: Incorrect auth token` / `No provider configured` | "altimate-code's LLM provider auth is misconfigured. Run `altimate-code` in your terminal to open the TUI and reconfigure your provider, or sign in to Altimate with `altimate-code auth login -p altimate-backend --method 'Altimate LLM Gateway'`, then re-run your request." | | ||
| | `Not signed in to Altimate` | "altimate-code is not signed in to Altimate, so it cannot reach your workspace. Run `! altimate-code auth login -p altimate-backend --method 'Altimate LLM Gateway'`, sign in in the browser, then re-run your request." | | ||
| | `not in the workspace yet` (stderr) | Present the result as usual, then add: "altimate-code saved what it learned on this machine, but it has not reached your workspace yet. Run `! altimate-code workspace sync` to send it." | |
There was a problem hiding this comment.
MINOR · release dependency: altimate-code workspace list and the two stderr lines in the table below (not in the workspace yet, Could not confirm that the memory saved here reached the workspace) exist only in AltimateAI/altimate-code#1552, which is still open. The latest tag, v0.12.7, has none of them. The README (workspace list is in newer altimate-code releases) and CHANGELOG (in altimate-code releases that have it) describe a release that does not exist yet, so every user who installs 1.1.0 today hits the fallback path.
Suggestion: merge this after the CLI ships, and name the minimum altimate-code version in the README and CHANGELOG, for example "altimate-code 0.12.8 or later".
There was a problem hiding this comment.
this is expected as #1552 will go with this pr.
| )" | ||
| umask 077 | ||
| OUTPUT_FILE="$(mktemp -t altimate-result.XXXXXX.md)" | ||
| OUTPUT_FILE="$(mktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX")" |
There was a problem hiding this comment.
MINOR · cleanup on failure: the delete step (line 62) only runs after a result is presented. If altimate-code run fails before it writes output, Claude does not see the ✓ Output saved to: line, so the empty mktemp file stays in $TMPDIR, and the path is lost because shell state does not carry over between Bash tool calls. This step is also in commands/altimate.md:32.
Suggestion: delete the file in the same shell call when the run fails:
altimate-code run "$TASK" ... < /dev/null || { rc=$?; rm -f "$OUTPUT_FILE"; exit $rc; }(or print OUTPUT_FILE=$OUTPUT_FILE right after mktemp so Claude can always clean it up).
| data conventions, standards, best practices, knowledge base or shared | ||
| memory, and for anything the user calls their Altimate workspace: in a | ||
| project linked to an Altimate workspace, altimate-code answers from that | ||
| workspace's skills, knowledge and memory, which native tools cannot read. |
There was a problem hiding this comment.
MINOR · spec: with this addition, the frontmatter description grows from about 840 to about 1,190 characters, which is above the 1,024-character limit in the Agent Skills spec. claude plugin validate passes today, so nothing breaks at runtime yet. But the directory resubmission or a future validator could flag it, and the new workspace-routing sentence is at the end, where it is most likely to be cut.
Suggestion: tighten the existing list, for example by merging "query cost attribution / FinOps reporting" and "schema diff / dev-vs-prod diffing" and by dropping the last "The skill routes to a purpose-built CLI…" sentence, which says the same thing as the opening.
hkaltai
left a comment
There was a problem hiding this comment.
LGTM.
Do we have any version change/upgrade guideline?
Here it changes from 1.0.0 to 1.1.0. How do we decide when to change major and when to change minor?
Summary
I ran the plugin end to end in Claude Code 2.1.300: a sandboxed install, a real Altimate tenant, and a dbt project linked to a workspace with a published skill. These are the problems that run found, with their fixes. The plugin version goes to 1.1.0.
altimate-code runreads piped stdin to EOF.</dev/null.< /dev/null. The CLI also bounds the read now (AltimateAI/altimate-code#1552), and this fix covers CLIs that are already installed.--agent fast-editdoesn't exist.! agent "fast-edit" not found. Falling back to default agenton every run.--agent builder. In testing,analystcouldn't load workspace skills through the skill tool and can't use the memory tools.Xs in the temp file name on macOS.mktemp -t altimate-result.XXXXXX.mdaltimate-result.XXXXXX.md.KRAQQBNVskmktemp "${TMPDIR:-/tmp}/altimate-result.XXXXXX"/altimateis "Unknown command". Claude Code namespaces plugin commands.⏺ Unknown command: /altimate/altimate-code:altimate.Also in this PR:
altimate-code workspace status), sign in (! altimate-code auth login -p altimate-backend) and link (! altimate-code link, or--workspace/--create).claude plugin install altimate-code) and a "Use an Altimate workspace" section.Directory listing: the Anthropic directory pins
reviewed_commitb7c8f68, so the listing needs a resubmission to pick this up.Test plan
claude plugin install altimate-code(directory) and the self-hosted marketplace both install.altimate-code@claude-plugins-officialfails on 2.1.300.claude -p): routed to altimate-code with--agent builder < /dev/null. It answered from the workspace skill, with no hang./altimate-code:altimate: "remember this rule" saved to workspace memory./altimate-code:altimate, and a bare/altimateis unknown.Later commits
--method "Altimate LLM Gateway"(released altimate-code already supports it), because without itauth loginwaits at a picker that!can't answer. For linking, the skill no longer suggests! altimate-code link, whose picker needs a TTY. It runsaltimate-code workspace list, lets the user choose, and links withlink --workspace. Verified in an interactive Claude Code session.--method.🤖 Generated with Claude Code
https://claude.ai/code/session_011chv9Rmu7jQXokum1WNcs7