{"record":{"id":"a41a9bb3857d515a","repo":"deepseek-ai/deepseek-harness","slug":"command-command-command-done-append-failed","errorCode":null,"errorMessage":"command \"${command}\": command/done append failed: ${renderThrown(appendError)}","messagePattern":"command \"(.+?)\": command/done append failed: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/interaction/commands/src/index.ts","lineNumber":406,"sourceCode":"    try {\n      const output = command.definition.handler(invocation)\n      result = normalizeResult(parsed.name, await withAbort(Promise.resolve(output), signal))\n    } catch (error: unknown) {\n      this.settleThrown(agent.session, parsed.name, commandId, error)\n      throw error\n    }\n    return settle(result)\n  }\n\n  /** Contained `command/done` error append for a thrown handler or admission failure. */\n  private settleThrown(session: Session, command: string, commandId: CommandId, error: unknown): void {\n    try {\n      this.appendLifecycle(session, 'command/done', {\n        commandId, kind: 'error',\n        text: error instanceof Error ? error.message : renderThrown(error),\n      })\n    } catch (appendError: unknown) {\n      this.ctx.logger.warn(`command \"${command}\": command/done append failed: ${renderThrown(appendError)}`)\n    }\n  }\n\n  /** Mint the next pairing id (monotonic; instance-token-prefixed so a resumed log never repeats one). */\n  private mintCommandId(): CommandId {\n    this.commandSeq += 1\n    return CommandId(`cmd-${this.instanceToken}-${this.commandSeq}`)\n  }\n\n  /**\n   * Append one log-only lifecycle event directly: no turn is opened for it and\n   * no flush is forced — persistence observes the eager `session/event` path\n   * and drains at ordinary checkpoints and teardown, like every other\n   * standalone plugin event.\n   */\n  private appendLifecycle<T extends 'command/run' | 'command/done'>(\n    session: Session,\n    type: T,","sourceCodeStart":388,"sourceCodeEnd":424,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/interaction/commands/src/index.ts#L388-L424","documentation":"Error \"command \"${command}\": command/done append failed: ${renderThrown(appendError)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/interaction/commands/src/index.ts:406 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the command history store is writable; fix storage and retry the command or restart the session."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}