Saved tool output truncation guidance omits host: "local" for SSH-targeted sessions

Aperta Adatta ai principianti
#63 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
tooling

Direzione di ricerca

Inizia da packages/agent-core-v2/src/agent/toolResultTruncation/toolResultTruncationService.ts, intorno alle righe 173–178, poi consulta la documentazione di riferimento degli strumenti in inglese e cinese in docs/{en,zh}/reference/tools.md. Aggiorna le indicazioni sull’output salvato specificando di leggere il percorso locale di overflow con host: "local"; il lavoro è completato quando le indicazioni del servizio e entrambi i documenti lo spiegano chiaramente per le sessioni SSH.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug documentation

What went wrong?

Found during the #5 tool verification pass (#5 Step 12).

When an SSH-targeted command (Bash with host: "<ssh-host>" or in a remote SSH workspace) prints more than 50,000 characters, ToolResultTruncationService saves the overflow file under the local Kiki server's <home> directory (packages/agent-core-v2/src/agent/toolResultTruncation/toolResultTruncationService.ts:173-178) and emits:

output_path: <local-kiki-home>/sessions/.../output.log
next_step: Use Read with output_path to page through; use Grep to search.

Because next_step does not mention host: "local", an agent working against an SSH host (either by passing host: "<ssh-host>" to Read or when the session's primary workspace is on SSH) fails to read the saved output path directly:

Environment: POSIX SSH (host: "issue5-posix", Linux, bash).

Call 1 (Bash):

{
  "command": "seq 1 20000",
  "host": "issue5-posix"
}

Returned output_path on the local Kiki host plus next_step: Use Read with output_path to page through; use Grep to search.

Call 2 (Read targeting the SSH host):

{
  "path": "<saved-local-output-path>/agents/main/tasks/bash-6ucy7y09/output.log",
  "host": "issue5-posix"
}

Received text:

<system>ERROR: Tool execution failed.</system>
host: issue5-posix
platform: Linux
shell: bash
stat failed: Permission denied

Calling Read on the local host (host: "local", or omitting host when the primary workspace is local) reads the saved output cleanly. Both next_step in ToolResultTruncationService (when SSH is active) and docs/{en,zh}/reference/tools.md should tell the agent to pass host: "local" for saved overflow output_path files.

Related: #5

Lingua principale
TypeScript
Stelle
54
Fork
5
Merge medio
2h 54m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di X-T-E-R/kiki

Tutte le issue di X-T-E-R/kiki

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.